Package org.eclipse.jgit.util
Class RawCharSequence
java.lang.Object
org.eclipse.jgit.util.RawCharSequence
- All Implemented Interfaces:
CharSequence
A rough character sequence around a raw byte buffer.
Characters are assumed to be 8-bit US-ASCII.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final byte[]
static final RawCharSequence
A zero-length character sequence.(package private) final int
(package private) final int
-
Constructor Summary
ConstructorsConstructorDescriptionRawCharSequence
(byte[] buf, int start, int end) Create a rough character sequence around the raw byte buffer. -
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int index) int
length()
subSequence
(int start, int end) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
Field Details
-
EMPTY
A zero-length character sequence. -
buffer
final byte[] buffer -
startPtr
final int startPtr -
endPtr
final int endPtr
-
-
Constructor Details
-
RawCharSequence
public RawCharSequence(byte[] buf, int start, int end) Create a rough character sequence around the raw byte buffer.- Parameters:
buf
- buffer to scan.start
- starting position for the sequence.end
- ending position for the sequence.
-
-
Method Details
-
charAt
public char charAt(int index) - Specified by:
charAt
in interfaceCharSequence
-
length
public int length()- Specified by:
length
in interfaceCharSequence
-
subSequence
- Specified by:
subSequence
in interfaceCharSequence
-
toString
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-