public class CharBufferWrapper extends ByteBufferWrapper
ByteBufferWrapper
that uses 2 bytes for a character representation.Constructor and Description |
---|
CharBufferWrapper(java.lang.String name,
BinaryChannel binaryChannel)
Constructor for reading a single char.
|
CharBufferWrapper(java.lang.String name,
BinaryChannel binaryChannel,
int numberOfValues)
Constructor for reading a char[] or a String.
|
Modifier and Type | Method and Description |
---|---|
char |
getChar() |
char |
getChar(int index) |
char[] |
getCharArray() |
protected java.nio.CharBuffer |
getCharBuffer() |
int |
getSize()
Returns the capacity of the underlying buffer in bytes.
|
java.lang.String |
getString()
Reads in a loop until '0' was found as a string terminator
|
void |
reset()
Clears the internal cache and forces the data to be re-read again on the next access.
|
getBinaryChannel, getByteBuffer, getByteOrder, getCapacity, getData, getEndPosition, getJavaDataType, getName, getNumberOfValues, getPredecessor, getReadOffset, getStartPosition, read, setPredecessor, setReadOffset
getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString
public CharBufferWrapper(java.lang.String name, BinaryChannel binaryChannel)
public CharBufferWrapper(java.lang.String name, BinaryChannel binaryChannel, int numberOfValues)
protected final java.nio.CharBuffer getCharBuffer() throws java.io.IOException
java.io.IOException
public final char getChar() throws java.io.IOException
java.io.IOException
public final char getChar(int index) throws java.io.IOException
java.io.IOException
public final char[] getCharArray() throws java.io.IOException
java.io.IOException
public final java.lang.String getString() throws java.io.IOException
java.io.IOException
public final int getSize() throws java.io.IOException
ByteBufferWrapper
getSize
in class ByteBufferWrapper
java.io.IOException
public void reset()
ByteBufferWrapper
reset
in interface Resettable
reset
in class ByteBufferWrapper
Copyright © 2014 EsprIT-Systems. All Rights Reserved.