The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search
Class grendel.storage.ByteString
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() 
Overrides:
toString in class Object


toByteBuf

   public ByteBuf toByteBuf() 


toBytes

   public byte[] toBytes() 


hashBytes

   protected int hashBytes(byte[] b, 
                           int start, 
                           int len) 


hashCode

   public int hashCode() 
Overrides:
hashCode in class Object


equals

   public boolean equals(Object x) 
Overrides:
equals in class Object


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4
Copyright © 1998-1999 The Mozilla Organization.
Last modified December 25, 1998.