Example usage for com.itextpdf.text.io FileChannelRandomAccessSource close

List of usage examples for com.itextpdf.text.io FileChannelRandomAccessSource close

Introduction

In this page you can find the example usage for com.itextpdf.text.io FileChannelRandomAccessSource close.

Prototype

public void close() throws IOException 

Source Link

Document

Cleans the mapped bytebuffers and closes the channel

Usage

From source file:com.ephesoft.dcma.util.FileUtils.java

License:Open Source License

/**
 * Closes the FileChannelRandomAccessSource.
 * //ww  w . j a v  a  2s .  c  o  m
 * @param fileChannelRandomAccessSource {@link com.itextpdf.text.io.FileChannelRandomAccessSource} to be closed.
 */
public static void closeFileChannelRandomAccessSource(
        final FileChannelRandomAccessSource fileChannelRandomAccessSource) {
    try {
        if (null != fileChannelRandomAccessSource) {
            fileChannelRandomAccessSource.close();
        }
    } catch (final IOException e) {
        LOGGER.error(EphesoftStringUtil.concatenate(
                "Exception occured while closing fileChannelRandomAccessSource ", e.getMessage(), e));
    }
}