wonderly.jeaprs
Class ByteString

java.lang.Object
  |
  +--wonderly.jeaprs.ByteString
All Implemented Interfaces:
java.io.Serializable

public class ByteString
extends java.lang.Object
implements java.io.Serializable

This class is like java.lang.String in terms of methods, but it does not support multibyte chars. It is used to keep from having control chars in the byte[] data from resulting in them being misinterrupted as a multi-byte character.

Version:
1.0
Author:
Gregg Wonderly - The information contained in this document is Copyright 2001-2003, Gregg Wonderly, all rights reserved.
See Also:
Serialized Form

Constructor Summary
ByteString(byte[] arr)
           
ByteString(java.lang.Object[] obj)
           
ByteString(java.lang.String str)
           
 
Method Summary
 byte charAt(int i)
           
 boolean compareNoCase(byte b1, byte b2)
           
 boolean endsWith(java.lang.String str)
           
 boolean equals(java.lang.Object obj)
           
 boolean equalsIgnoreCase(wonderly.jeaprs.ByteString str)
           
 boolean equalsIgnoreCase(java.lang.String str)
           
 byte[] getBytes()
           
 int hashCode()
           
 int indexOf(char c)
           
 boolean isAlpha(byte b)
           
 int length()
           
 wonderly.jeaprs.ByteString replace(byte f, byte t)
           
 wonderly.jeaprs.ByteString replace(char f, char t)
           
 boolean startsWith(java.lang.String str)
           
 wonderly.jeaprs.ByteString substring(int off)
           
 wonderly.jeaprs.ByteString substring(int off, int end)
           
 wonderly.jeaprs.ByteString toLowerCase()
           
 java.lang.String toString()
           
 wonderly.jeaprs.ByteString toUpperCase()
           
 wonderly.jeaprs.ByteString trim()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteString

public ByteString(byte[] arr)

ByteString

public ByteString(java.lang.String str)

ByteString

public ByteString(java.lang.Object[] obj)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toLowerCase

public wonderly.jeaprs.ByteString toLowerCase()

toUpperCase

public wonderly.jeaprs.ByteString toUpperCase()

replace

public wonderly.jeaprs.ByteString replace(byte f,
                                          byte t)

equalsIgnoreCase

public boolean equalsIgnoreCase(wonderly.jeaprs.ByteString str)

equalsIgnoreCase

public boolean equalsIgnoreCase(java.lang.String str)

isAlpha

public boolean isAlpha(byte b)

compareNoCase

public boolean compareNoCase(byte b1,
                             byte b2)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

replace

public wonderly.jeaprs.ByteString replace(char f,
                                          char t)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

trim

public wonderly.jeaprs.ByteString trim()

getBytes

public byte[] getBytes()

charAt

public byte charAt(int i)

startsWith

public boolean startsWith(java.lang.String str)

endsWith

public boolean endsWith(java.lang.String str)

length

public int length()

substring

public wonderly.jeaprs.ByteString substring(int off)

substring

public wonderly.jeaprs.ByteString substring(int off,
                                            int end)

indexOf

public int indexOf(char c)