Class Buffer

java.lang.Object
com.portal.pcm.Buffer
Direct Known Subclasses:
ByteBuffer, FileBuffer

public abstract class Buffer extends Object
The Buffer class is used to encapsulate the Portal FLDT_BUF functionality.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Create an instance of a Buffer.
    protected
    Buffer(int offset, boolean forRead)
    Create an instance of a Buffer.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract InputStream
    Gets an InputStream to read buffer information.
    int
    Get the buffer offset value.
    abstract OutputStream
    Gets an OutputStream to write buffer information.
    abstract long
    Gets the buffer size.
    boolean
    Returns true if the buffer is to be used to read data from the database.
    void
    setOffset(int offset)
    Set the buffer offset value.
    void
    setReadFlag(boolean forRead)
    Sets the read flag to indicate whether or not data should be read into the buffer from the database, or written from the buffer to the DB.
    Gets a string representation of this byte buffer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Buffer

      protected Buffer(int offset, boolean forRead)
      Create an instance of a Buffer.
      Parameters:
      offset - The new offset value
      forRead - The new read flag
    • Buffer

      protected Buffer()
      Create an instance of a Buffer.
  • Method Details

    • getOffset

      public int getOffset()
      Get the buffer offset value.
      Returns:
      The Offset as an int.
    • setOffset

      public void setOffset(int offset)
      Set the buffer offset value.
      Parameters:
      offset - The new offset value.
    • isReadBuffer

      public boolean isReadBuffer()
      Returns true if the buffer is to be used to read data from the database.
      Returns:
      true if database info is to be read into file.
    • setReadFlag

      public void setReadFlag(boolean forRead)
      Sets the read flag to indicate whether or not data should be read into the buffer from the database, or written from the buffer to the DB.
      Parameters:
      forRead - The new read flag
    • getSize

      public abstract long getSize()
      Gets the buffer size.
      Returns:
      The buffer size.
    • getInputStream

      public abstract InputStream getInputStream() throws IOException
      Gets an InputStream to read buffer information. *

      This exception may be thrown if there is an issue with the underlying I/O operations, such as problems accessing the buffer or errors during stream creation.

      Returns:
      An InputStream object.
      Throws:
      IOException - This exception may be thrown if there is an issue with the underlying I/O operations
    • getOutputStream

      public abstract OutputStream getOutputStream() throws IOException
      Gets an OutputStream to write buffer information.

      This exception may be thrown if there is an issue with the underlying I/O operations, such as problems accessing the buffer or errors during stream creation.

      Returns:
      An OutputStream object.
      Throws:
      IOException - This exception may be thrown if there is an issue with the underlying I/O operations
    • toString

      public String toString()
      Gets a string representation of this byte buffer.
      Overrides:
      toString in class Object
      Returns:
      A String representing this object.