Package com.portal.pcm
Class FileBuffer
java.lang.Object
com.portal.pcm.Buffer
com.portal.pcm.FileBuffer
The FileBuffer subclass of Buffer is used when the buffered information is
to be stored in an external file.
-
Constructor Summary
ConstructorsConstructorDescriptionFileBuffer(File file, boolean forRead) Creates an instance of a Buffer.FileBuffer(File file, boolean forRead, int offset) Creates an instance of a Buffer.FileBuffer(String fileName, boolean forRead) Creates an instance of a Buffer.FileBuffer(String fileName, boolean forRead, int offset) Creates an instance of a Buffer. -
Method Summary
Modifier and TypeMethodDescriptionGets the file name and path of the file.Gets an InputStream to read buffer information.Gets an OutputStream to write buffer information.longgetSize()Gets the buffer size.Methods inherited from class com.portal.pcm.Buffer
getOffset, isReadBuffer, setOffset, setReadFlag, toString
-
Constructor Details
-
FileBuffer
Creates an instance of a Buffer.- Parameters:
file-FileobjectforRead- boolean value indicating whether to read the fileoffset- buffer offset- Throws:
EBufException
-
FileBuffer
Creates an instance of a Buffer.- Parameters:
file-FileobjectforRead- boolean value indicating whether to read the file- Throws:
EBufException
-
FileBuffer
Creates an instance of a Buffer.- Parameters:
fileName- name of the fileforRead- boolean value indicating whether to read the fileoffset- buffer offset- Throws:
EBufException
-
FileBuffer
Creates an instance of a Buffer.- Parameters:
fileName-Stringname of the fileforRead- boolean value indicating whether to read the file- Throws:
EBufException
-
-
Method Details
-
getSize
public long getSize()Gets the buffer size. -
getInputStream
Gets an InputStream to read buffer information.- Specified by:
getInputStreamin classBuffer- Returns:
- An InputStream object.
- Throws:
IOException
-
getOutputStream
Gets an OutputStream to write buffer information.- Specified by:
getOutputStreamin classBuffer- Returns:
- An OutputStream object.
- Throws:
IOException
-
getFilename
Gets the file name and path of the file.- Returns:
- The file path as a string.
-