Class FileBuffer

java.lang.Object
com.portal.pcm.Buffer
com.portal.pcm.FileBuffer

public class FileBuffer extends Buffer
The FileBuffer subclass of Buffer is used when the buffered information is to be stored in an external file.
  • Constructor Details

    • FileBuffer

      public FileBuffer(File file, boolean forRead, int offset) throws EBufException
      Creates an instance of a Buffer.
      Parameters:
      file - File object
      forRead - boolean value indicating whether to read the file
      offset - buffer offset
      Throws:
      EBufException
    • FileBuffer

      public FileBuffer(File file, boolean forRead) throws EBufException
      Creates an instance of a Buffer.
      Parameters:
      file - File object
      forRead - boolean value indicating whether to read the file
      Throws:
      EBufException
    • FileBuffer

      public FileBuffer(String fileName, boolean forRead, int offset) throws EBufException
      Creates an instance of a Buffer.
      Parameters:
      fileName - name of the file
      forRead - boolean value indicating whether to read the file
      offset - buffer offset
      Throws:
      EBufException
    • FileBuffer

      public FileBuffer(String fileName, boolean forRead) throws EBufException
      Creates an instance of a Buffer.
      Parameters:
      fileName - String name of the file
      forRead - boolean value indicating whether to read the file
      Throws:
      EBufException
  • Method Details

    • getSize

      public long getSize()
      Gets the buffer size.
      Specified by:
      getSize in class Buffer
      Returns:
      The buffer size.
    • getInputStream

      public InputStream getInputStream() throws IOException
      Gets an InputStream to read buffer information.
      Specified by:
      getInputStream in class Buffer
      Returns:
      An InputStream object.
      Throws:
      IOException
    • getOutputStream

      public OutputStream getOutputStream() throws IOException
      Gets an OutputStream to write buffer information.
      Specified by:
      getOutputStream in class Buffer
      Returns:
      An OutputStream object.
      Throws:
      IOException
    • getFilename

      public String getFilename()
      Gets the file name and path of the file.
      Returns:
      The file path as a string.