OSMQ
v2.0.1

osmq.util
Class ByteString

java.lang.Object
  extended byosmq.util.ByteString
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

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

An object with methods similar to String but handling byte-size character arrays.

See Also:
Serialized Form

Constructor Summary
ByteString()
           
ByteString(byte[] value)
           
ByteString(byte[] value, int offset, int count)
           
ByteString(java.lang.String value)
           
 
Method Summary
 byte byteAt(int index)
           
 char charAt(int index)
           
 int compareTo(ByteString anotherString)
           
 int compareTo(java.lang.Object o)
           
 ByteString concat(ByteString str)
           
 boolean equals(java.lang.Object anObject)
           
 void getBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin)
           
 int indexOf(byte ch)
           
 int indexOf(byte ch, int fromIndex)
           
 int lastIndexOf(byte ch)
           
 int lastIndexOf(byte ch, int fromIndex)
           
 int length()
           
static void main(java.lang.String[] vars)
           
 ByteString replace(byte oldChar, byte newChar)
           
 ByteString substring(int beginIndex)
           
 ByteString substring(int beginIndex, int endIndex)
           
 char[] toCharArray()
           
 java.lang.String toString()
           
 ByteString trim()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteString

public ByteString()

ByteString

public ByteString(java.lang.String value)

ByteString

public ByteString(byte[] value)

ByteString

public ByteString(byte[] value,
                  int offset,
                  int count)
Method Detail

length

public int length()

byteAt

public byte byteAt(int index)

charAt

public char charAt(int index)

getBytes

public void getBytes(int srcBegin,
                     int srcEnd,
                     byte[] dst,
                     int dstBegin)

equals

public boolean equals(java.lang.Object anObject)

compareTo

public int compareTo(ByteString anotherString)

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

indexOf

public int indexOf(byte ch)

indexOf

public int indexOf(byte ch,
                   int fromIndex)

lastIndexOf

public int lastIndexOf(byte ch)

lastIndexOf

public int lastIndexOf(byte ch,
                       int fromIndex)

substring

public ByteString substring(int beginIndex)

substring

public ByteString substring(int beginIndex,
                            int endIndex)

concat

public ByteString concat(ByteString str)

replace

public ByteString replace(byte oldChar,
                          byte newChar)

trim

public ByteString trim()

toString

public java.lang.String toString()

toCharArray

public char[] toCharArray()

main

public static void main(java.lang.String[] vars)

(c) 2000 - 2003 MQue Systems
All Rights Reserved