Package com.portal.pcm
Class Buffer
java.lang.Object
com.portal.pcm.Buffer
- Direct Known Subclasses:
ByteBuffer
,FileBuffer
The Buffer class is used to encapsulate the Portal FLDT_BUF functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract 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
getSize()
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.toString()
Gets a string representation of this byte buffer.
-
Constructor Details
-
Buffer
protected Buffer(int offset, boolean forRead) Create an instance of a Buffer.- Parameters:
offset
- The new offset valueforRead
- 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
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
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
Gets a string representation of this byte buffer.
-