Package com.helger.commons.io.file
Class FileChannelHelper
java.lang.Object
com.helger.commons.io.file.FileChannelHelper
Miscellaneous
FileChannel utility methods.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic FileChannelgetFileReadChannel(File aFile) static FileChannelgetFileReadChannel(String sFilename) static longgetFileSize(FileChannel aChannel) static FileChannelgetFileWriteChannel(File aFile) static FileChannelgetFileWriteChannel(File aFile, EAppend eAppend) static FileChannelgetFileWriteChannel(String sFilename) static FileChannelgetFileWriteChannel(String sFilename, EAppend eAppend) static InputStreamgetInputStream(File aFile) static InputStreamgetMappedInputStream(File aFile) Get an input stream to the specified file, using memory mapping.static OutputStreamgetMappedOutputStream(File aFile) static OutputStreamgetMappedOutputStream(File aFile, EAppend eAppend) static OutputStreamgetMappedOutputStream(String sFilename) static OutputStreamgetMappedOutputStream(String sFilename, EAppend eAppend)
-
Method Details
-
getFileSize
-
getInputStream
-
getFileReadChannel
-
getFileReadChannel
-
getMappedInputStream
Get an input stream to the specified file, using memory mapping. If memory mapping fails, a regularFileInputStreamis returned.- Parameters:
aFile- The file to use. May not benull.- Returns:
- The Input stream to use.
-
getFileWriteChannel
-
getFileWriteChannel
-
getFileWriteChannel
-
getFileWriteChannel
-
getMappedOutputStream
-
getMappedOutputStream
-
getMappedOutputStream
-
getMappedOutputStream
-