|
||||||||||
| 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,
java.lang.String compareTo)
|
int |
compareIgnoreCase(int start,
int end,
java.lang.String compareTo)
|
void |
delete(int start,
int end)
|
boolean |
equals(java.lang.CharSequence s)
|
boolean |
equalsIgnoreCase(byte[] b)
|
boolean |
equalsIgnoreCase(java.lang.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,
java.lang.CharSequence s)
|
int |
indexOf(char c,
int fromIndex)
|
int |
indexOf(java.lang.String s,
int fromIndex)
|
boolean |
isNull()
|
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,
boolean disposeOnRecycle)
|
void |
setBufferChunk(Buffer buffer,
int start,
int end,
int limit)
|
void |
setBufferChunk(Buffer buffer,
int start,
int end,
int limit,
boolean disposeOnRecycle)
|
void |
setEnd(int end)
|
void |
setStart(int start)
|
static boolean |
startsWith(Buffer buffer,
int start,
int end,
byte[] cmpTo)
|
boolean |
startsWithIgnoreCase(java.lang.String s,
int pos)
|
CharChunk |
toChars(CharChunk cc,
java.nio.charset.Charset encoding)
Convert a BufferChunk using the specified encoding. |
java.lang.String |
toString()
|
java.lang.String |
toString(java.nio.charset.Charset charset)
|
java.lang.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,
boolean disposeOnRecycle)
public void setBufferChunk(Buffer buffer,
int start,
int end)
public void setBufferChunk(Buffer buffer,
int start,
int end,
int limit)
public void setBufferChunk(Buffer buffer,
int start,
int end,
int limit,
boolean disposeOnRecycle)
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(java.lang.String s,
int fromIndex)
indexOf in interface Chunk
public boolean startsWithIgnoreCase(java.lang.String s,
int pos)
public int findBytesAscii(byte[] b)
Buffer.
b - byte sequence to search for.
Bufferpublic int hash()
public boolean equals(java.lang.CharSequence s)
public boolean equalsIgnoreCase(java.lang.CharSequence s)
public boolean equalsIgnoreCase(byte[] b)
public boolean equalsIgnoreCaseLowerCase(byte[] b)
b - the byte[] to compare
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.nio.charset.Charset charset)
public java.lang.String toString(int start,
int end)
toString in interface Chunkprotected final void resetStringCache()
protected final void reset()
public final void recycle()
public void notifyDirectUpdate()
notifyDirectUpdate in interface Chunk
public static int indexOf(Buffer buffer,
int off,
int end,
char qq)
public static int indexOf(Buffer buffer,
int off,
int end,
java.lang.CharSequence s)
public int compareIgnoreCase(int start,
int end,
java.lang.String compareTo)
public int compare(int start,
int end,
java.lang.String compareTo)
public CharChunk toChars(CharChunk cc,
java.nio.charset.Charset encoding)
throws java.io.CharConversionException
BufferChunk using the specified encoding.
cc - char array to put result to.encoding - the encoding value
java.lang.Exception
java.io.CharConversionException
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 | |||||||||