The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Search
Feedback


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 The Mozilla Organization.