Top Description Inners Fields Constructors Methods
org.mortbay.io

public Class BufferCache

extends Object
Class Inheritance
Known Direct Subclasses
org.mortbay.jetty.HttpHeaders, org.mortbay.jetty.HttpHeaderValues
Imports
java.util.ArrayList, .HashMap, .Map.Entry, org.mortbay.util.StringMap

Stores a collection of Buffer objects. Buffers are stored in an ordered collection and can retreived by index or value
Author
gregw

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private HashMap<K, V>
private ArrayList<E>
private StringMap

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BufferCache.CachedBuffer
add(String
The content of the buffer.
value
,
int ordinal)

Add a buffer to the cache at the specified index.

public BufferCache.CachedBuffer
get(int ordinal)

public BufferCache.CachedBuffer
get(Buffer buffer)

public BufferCache.CachedBuffer
get(String value)

public BufferCache.CachedBuffer
getBest(byte[] value, int offset, int maxLength)

public int
public Buffer
lookup(Buffer buffer)

public Buffer
lookup(String value)

public String
toString(Buffer buffer)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_bufferMapback to summary
private HashMap<K, V> _bufferMap
_indexback to summary
private ArrayList<E> _index
_stringMapback to summary
private StringMap _stringMap

Constructor Detail

BufferCacheback to summary
public BufferCache()

Method Detail

addback to summary
public BufferCache.CachedBuffer add(String value, int ordinal)

Add a buffer to the cache at the specified index.

Parameters
value:String

The content of the buffer.

getback to summary
public BufferCache.CachedBuffer get(int ordinal)
getback to summary
public BufferCache.CachedBuffer get(Buffer buffer)
getback to summary
public BufferCache.CachedBuffer get(String value)
getBestback to summary
public BufferCache.CachedBuffer getBest(byte[] value, int offset, int maxLength)
getOrdinalback to summary
public int getOrdinal(Buffer buffer)
lookupback to summary
public Buffer lookup(Buffer buffer)
lookupback to summary
public Buffer lookup(String value)
toStringback to summary
public String toString(Buffer buffer)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

org.mortbay.io back to summary

public Class BufferCache.CachedBuffer

extends CaseInsensitive
Class Inheritance

Field Summary

Modifier and TypeField and Description
private HashMap<K, V>
private int

Constructor Summary

AccessConstructor and Description
public
CachedBuffer(String value, int ordinal)

Method Summary

Modifier and TypeMethod and Description
public BufferCache.CachedBuffer
public int
public void
Inherited from org.mortbay.io.ByteArrayBuffer.CaseInsensitive:
equals

Field Detail

_associateMapback to summary
private HashMap<K, V> _associateMap
_ordinalback to summary
private int _ordinal

Constructor Detail

CachedBufferback to summary
public CachedBuffer(String value, int ordinal)

Method Detail

getAssociateback to summary
public BufferCache.CachedBuffer getAssociate(Object key)
getOrdinalback to summary
public int getOrdinal()
setAssociateback to summary
public void setAssociate(Object key, BufferCache.CachedBuffer associate)