Package org.jppf.io
Class FileInputSource
java.lang.Object
org.jppf.io.ChannelInputSource
org.jppf.io.FileInputSource
- All Implemented Interfaces:
Closeable,AutoCloseable,InputSource,IO
Input source backed by a file.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.jppf.io.ChannelInputSource
channelFields inherited from interface org.jppf.io.IO
CHECK_LOW_MEMORY, EMPTY_BYTES, FREE_MEM_TO_SIZE_RATIO, GC_ON_DISK_OVERFLOW, LENGTH_BUFFER_POOL, LENGTH_BUFFER_POOL_SIZE, LOW_MEMORY_THRESHOLD, SOCKET_BUFFER_SIZE, SOCKET_KEEPALIVE, SOCKET_TCP_NODELAY, TEMP_BUFFER_POOL, TEMP_BUFFER_POOL_SIZE, TEMP_BUFFER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionFileInputSource(File file) Initialize this file input source with the specified file.FileInputSource(String path) Initialize this file input source with the specified file path. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this input source and release any system resources associated with it.
-
Constructor Details
-
FileInputSource
Initialize this file input source with the specified file path.- Parameters:
path- the path to the file to read from.- Throws:
Exception- if an IO error occurs.
-
FileInputSource
Initialize this file input source with the specified file.- Parameters:
file- the file to read from.- Throws:
Exception- if an IO error occurs.
-
-
Method Details
-
close
Close this input source and release any system resources associated with it.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classChannelInputSource- Throws:
IOException- if an IO error occurs.
-