All Packages This Package Class Hierarchy Class Search Index
Class grendel.storage.ByteString
java.lang.Object | +----grendel.storage.ByteString
Represents a set of bytes. This is a spiritual cousin of String, but without the misfeature that characters are two bytes each, and there are 16 bytes of extranious object header. Since we store message headers internally in their on-the-wire form, and that is 7-bit ASCII (and occasionally 8-bit if people are being nonstandard) this is a much more tolerable representation.
This class doesn't provide all of the utilities that String does, but that's pretty much just because I didn't need them (yet?)
this is used by ByteStringTable to uniqueify the strings, to further reduce memory usage.
See Also: ByteStringTable, MessageID
class ByteString extends java.lang.Object { // Fields 1 protected byte[] bytes; // Constructors 2 ByteString(byte[]); ByteString(ByteBuf); // Methods 6 public boolean equals(Object); protected int hashBytes(byte[], int, int); public int hashCode(); public ByteBuf toByteBuf(); public byte[] toBytes(); public String toString(); }
Fields
bytes
protected byte[] bytes
Constructors
ByteString
ByteString(byte[] bytes)
ByteString
ByteString(ByteBuf buf)
Methods
toString
public String toString()
toByteBuf
public ByteBuf toByteBuf()
toBytes
public byte[] toBytes()
hashBytes
protected int hashBytes(byte[] b, int start, int len)
hashCode
public int hashCode()
equals
public boolean equals(Object x)
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4