public class AsciiSequenceView extends Object implements CharSequence
DirectBuffer which contains an ASCII string for a given range.| Constructor and Description |
|---|
AsciiSequenceView() |
AsciiSequenceView(DirectBuffer buffer,
int offset,
int length)
Construct a view over a
DirectBuffer from an offset for a given length.. |
| Modifier and Type | Method and Description |
|---|---|
DirectBuffer |
buffer()
Gets the underlying buffer which this is a view over.
|
char |
charAt(int index) |
int |
getBytes(MutableDirectBuffer dstBuffer,
int dstOffset)
Copy the bytes from a view into a provided buffer.
|
int |
length() |
int |
offset()
Gets the offset into the underlying buffer.
|
void |
reset()
Reset the view to null.
|
AsciiSequenceView |
subSequence(int start,
int end) |
String |
toString() |
AsciiSequenceView |
wrap(DirectBuffer buffer,
int offset,
int length)
Wrap a range of an existing buffer containing an ASCII sequence.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchars, codePointspublic AsciiSequenceView()
public AsciiSequenceView(DirectBuffer buffer, int offset, int length)
DirectBuffer from an offset for a given length..buffer - containing the ASCII sequence.offset - at which the ASCII sequence begins.length - of the ASCII sequence in bytes.public int length()
length in interface CharSequencepublic DirectBuffer buffer()
public int offset()
public char charAt(int index)
charAt in interface CharSequencepublic AsciiSequenceView subSequence(int start, int end)
subSequence in interface CharSequencepublic AsciiSequenceView wrap(DirectBuffer buffer, int offset, int length)
buffer - containing the ASCII sequence.offset - at which the ASCII sequence begins.length - of the ASCII sequence in bytes.public void reset()
public int getBytes(MutableDirectBuffer dstBuffer, int dstOffset)
dstBuffer - into which the bytes will be copied.dstOffset - offset in the destination buffer to begin the copy.public String toString()
toString in interface CharSequencetoString in class ObjectCopyright © 2014-2020 Real Logic Limited. All Rights Reserved.