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, wait
chars, codePoints
public 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 CharSequence
public DirectBuffer buffer()
public int offset()
public char charAt(int index)
charAt
in interface CharSequence
public AsciiSequenceView subSequence(int start, int end)
subSequence
in interface CharSequence
public 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 CharSequence
toString
in class Object
Copyright © 2014-2019 Real Logic Ltd. All Rights Reserved.