Package com.portal.pcm
Class ByteBuffer
java.lang.Object
com.portal.pcm.Buffer
com.portal.pcm.ByteBuffer
The ByteBuffer subclass of Buffer is used when the buffer information is
to be handled as a byte array.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of a Buffer.ByteBuffer
(byte[] bytes, int offset, boolean forRead) Creates an instance of a Buffer. -
Method Summary
Methods inherited from class com.portal.pcm.Buffer
getOffset, isReadBuffer, setOffset, setReadFlag, toString
-
Constructor Details
-
ByteBuffer
public ByteBuffer(byte[] bytes, int offset, boolean forRead) Creates an instance of a Buffer.- Parameters:
bytes
- holds the bytes which will be processedoffset
- initial position in the buffer to read or write atforRead
- boolean value indicating whether to read the file
-
ByteBuffer
public ByteBuffer()Creates an instance of a Buffer.
-
-
Method Details
-
getBytes
public byte[] getBytes()Gets the buffer.- Returns:
- The buffer as a byte array.
-
setBytes
public void setBytes(byte[] bytes) Sets the buffer.- Parameters:
bytes
- The new buffer.
-
getSize
public long getSize()Gets the buffer size. -
getInputStream
Gets an InputStream to read buffer information.- Specified by:
getInputStream
in classBuffer
- 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.- Specified by:
getOutputStream
in classBuffer
- Returns:
- An OutputStream object.
- Throws:
IOException
- This exception may be thrown if there is an issue with the underlying I/O operations
-