org.eclipse.jgit.util
Class RawCharSequence

java.lang.Object
  extended by org.eclipse.jgit.util.RawCharSequence
All Implemented Interfaces:
CharSequence

public final class RawCharSequence
extends Object
implements CharSequence

A rough character sequence around a raw byte buffer.

Characters are assumed to be 8-bit US-ASCII.


Field Summary
static RawCharSequence EMPTY
          A zero-length character sequence.
 
Constructor Summary
RawCharSequence(byte[] buf, int start, int end)
          Create a rough character sequence around the raw byte buffer.
 
Method Summary
 char charAt(int index)
           
 int length()
           
 CharSequence subSequence(int start, int end)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final RawCharSequence EMPTY
A zero-length character sequence.

Constructor Detail

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 Detail

charAt

public char charAt(int index)
Specified by:
charAt in interface CharSequence

length

public int length()
Specified by:
length in interface CharSequence

subSequence

public CharSequence subSequence(int start,
                                int end)
Specified by:
subSequence in interface CharSequence

toString

public String toString()
Specified by:
toString in interface CharSequence
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.