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, setReadOffsetgetLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelconfigureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toStringpublic 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.IOExceptionpublic final char getChar()
throws java.io.IOException
java.io.IOExceptionpublic final char getChar(int index)
throws java.io.IOException
java.io.IOExceptionpublic final char[] getCharArray()
throws java.io.IOException
java.io.IOExceptionpublic final java.lang.String getString()
throws java.io.IOException
java.io.IOExceptionpublic final int getSize()
throws java.io.IOException
ByteBufferWrappergetSize in class ByteBufferWrapperjava.io.IOExceptionpublic void reset()
ByteBufferWrapperreset in interface Resettablereset in class ByteBufferWrapperCopyright © 2014 EsprIT-Systems. All Rights Reserved.