public class ByteBufferWrapper extends SimpleLogSupportAdapter implements BinaryDataStructure
Constructor and Description |
---|
ByteBufferWrapper(java.lang.String name,
BinaryChannel binaryChannel,
JavaDataType javaDataType) |
ByteBufferWrapper(java.lang.String name,
BinaryChannel binaryChannel,
JavaDataType javaDataType,
int numberOfValues) |
Modifier and Type | Method and Description |
---|---|
protected BinaryChannel |
getBinaryChannel() |
java.nio.ByteBuffer |
getByteBuffer() |
protected java.nio.ByteOrder |
getByteOrder() |
protected int |
getCapacity() |
byte[] |
getData()
Reads the data from the underlying file.
|
long |
getEndPosition()
Tells the end-position of this buffer in the underlying random access file.
|
protected JavaDataType |
getJavaDataType() |
java.lang.String |
getName() |
protected int |
getNumberOfValues() |
BinaryDataStructure |
getPredecessor() |
long |
getReadOffset() |
int |
getSize()
Returns the capacity of the underlying buffer in bytes.
|
long |
getStartPosition()
Tells the start-position of this buffer in the underlying random access file.
|
protected int |
read() |
void |
reset()
Clears the internal cache and forces the data to be re-read again on the next access.
|
void |
setPredecessor(BinaryDataStructure predecessor)
Sets a reference to the previous structure.
|
void |
setReadOffset(long readOffset) |
getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString
public ByteBufferWrapper(java.lang.String name, BinaryChannel binaryChannel, JavaDataType javaDataType)
public ByteBufferWrapper(java.lang.String name, BinaryChannel binaryChannel, JavaDataType javaDataType, int numberOfValues)
protected final JavaDataType getJavaDataType()
protected final int getNumberOfValues()
protected final int getCapacity()
protected final BinaryChannel getBinaryChannel()
public final java.lang.String getName()
public final java.nio.ByteBuffer getByteBuffer() throws java.io.IOException
java.io.IOException
public final void setPredecessor(BinaryDataStructure predecessor)
BinaryDataStructure
setPredecessor
in interface BinaryDataStructure
BinaryDataStructure.getEndPosition()
public final BinaryDataStructure getPredecessor()
protected java.nio.ByteOrder getByteOrder() throws java.io.IOException
java.io.IOException
protected final int read() throws java.io.IOException
java.io.IOException
public byte[] getData() throws java.io.IOException
reset()
is called.java.io.IOException
public int getSize() throws java.io.IOException
java.io.IOException
public final long getStartPosition() throws java.io.IOException
java.io.IOException
public void setReadOffset(long readOffset)
public final long getEndPosition() throws java.io.IOException
getEndPosition
in interface BinaryDataStructure
java.io.IOException
getStartPosition()
public long getReadOffset()
public void reset()
reset
in interface Resettable
Copyright © 2014 EsprIT-Systems. All Rights Reserved.