|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.util.BufferChunk
public class BufferChunk
Buffer chunk representation.
Helps HTTP module to avoid redundant String creation.
| Constructor Summary | |
|---|---|
BufferChunk()
|
|
| Method Summary | |
|---|---|
void |
allocate(int size)
|
void |
append(BufferChunk bc)
|
int |
compare(int start,
int end,
String compareTo)
|
int |
compareIgnoreCase(int start,
int end,
String compareTo)
|
void |
delete(int start,
int end)
|
boolean |
equals(CharSequence s)
|
boolean |
equalsIgnoreCase(byte[] b)
|
boolean |
equalsIgnoreCase(CharSequence s)
|
static boolean |
equalsIgnoreCaseLowerCase(Buffer buffer,
int start,
int end,
byte[] cmpTo)
Compares the buffer chunk to the specified byte array representing lower-case ASCII characters. |
boolean |
equalsIgnoreCaseLowerCase(byte[] b)
Compares the buffer chunk to the specified byte array representing lower-case ASCII characters. |
int |
findBytesAscii(byte[] b)
Returns the starting index of the specified byte sequence within this Buffer. |
Buffer |
getBuffer()
|
int |
getEnd()
|
int |
getLength()
|
int |
getStart()
|
int |
hash()
|
static int |
indexOf(Buffer buffer,
int off,
int end,
char qq)
|
static int |
indexOf(Buffer buffer,
int off,
int end,
CharSequence s)
|
int |
indexOf(char c,
int fromIndex)
|
int |
indexOf(String s,
int fromIndex)
|
boolean |
isNull()
|
protected void |
notifyDirectUpdate()
Notify the Chunk that its content is going to be changed directly |
void |
recycle()
|
protected void |
reset()
|
protected void |
resetStringCache()
|
void |
setBuffer(Buffer buffer)
|
void |
setBufferChunk(Buffer buffer,
int start,
int end)
|
void |
setBufferChunk(Buffer buffer,
int start,
int end,
int limit)
|
void |
setEnd(int end)
|
void |
setStart(int start)
|
static boolean |
startsWith(Buffer buffer,
int start,
int end,
byte[] cmpTo)
|
boolean |
startsWithIgnoreCase(String s,
int pos)
|
String |
toString()
|
String |
toString(Charset charset)
|
String |
toString(int start,
int end)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BufferChunk()
| Method Detail |
|---|
public void setBufferChunk(Buffer buffer,
int start,
int end)
public void setBufferChunk(Buffer buffer,
int start,
int end,
int limit)
public Buffer getBuffer()
public void setBuffer(Buffer buffer)
public int getStart()
getStart in interface Chunkpublic void setStart(int start)
setStart in interface Chunkpublic int getEnd()
getEnd in interface Chunkpublic void setEnd(int end)
setEnd in interface Chunkpublic final int getLength()
getLength in interface Chunkpublic final boolean isNull()
public void allocate(int size)
public void delete(int start,
int end)
delete in interface Chunkpublic void append(BufferChunk bc)
public final int indexOf(char c,
int fromIndex)
indexOf in interface Chunk
public final int indexOf(String s,
int fromIndex)
indexOf in interface Chunk
public boolean startsWithIgnoreCase(String s,
int pos)
public int findBytesAscii(byte[] b)
Buffer.
b - byte sequence to search for.
Bufferpublic int hash()
public boolean equals(CharSequence s)
public boolean equalsIgnoreCase(CharSequence s)
public boolean equalsIgnoreCase(byte[] b)
public boolean equalsIgnoreCaseLowerCase(byte[] b)
b - the byte[] to compare
public String toString()
toString in class Objectpublic String toString(Charset charset)
public String toString(int start,
int end)
toString in interface Chunkprotected final void resetStringCache()
protected final void reset()
public final void recycle()
protected void notifyDirectUpdate()
public static int indexOf(Buffer buffer,
int off,
int end,
char qq)
public static int indexOf(Buffer buffer,
int off,
int end,
CharSequence s)
public int compareIgnoreCase(int start,
int end,
String compareTo)
public int compare(int start,
int end,
String compareTo)
public static boolean equalsIgnoreCaseLowerCase(Buffer buffer,
int start,
int end,
byte[] cmpTo)
buffer - the byte[] to comparestart - buffer startend - buffer endcmpTo - byte[] to compare against
public static boolean startsWith(Buffer buffer,
int start,
int end,
byte[] cmpTo)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||