ucar.unidata.util
Class ByteString.TrSubString

java.lang.Object
  extended by ucar.unidata.util.ByteString
      extended by ucar.unidata.util.ByteString.Concrete
          extended by ucar.unidata.util.ByteString.TrSubString
All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
ByteString.SubString
Enclosing class:
ByteString

public static class ByteString.TrSubString
extends ByteString.Concrete

A ByteString implementation which which is zero based in the underlying byte array but whose length is possibly less than the underlying byte array. "Truncated SubString of ByteString".

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.unidata.util.ByteString
ByteString.Concrete, ByteString.Empty, ByteString.SubString, ByteString.TrSubString
 
Field Summary
protected  int length_
          _more_
 
Fields inherited from class ucar.unidata.util.ByteString.Concrete
ba_
 
Fields inherited from class ucar.unidata.util.ByteString
nada
 
Constructor Summary
ByteString.TrSubString(byte[] ba, boolean share, int length)
          _more_
ByteString.TrSubString(ByteString.Concrete bs, int length)
          _more_
 
Method Summary
 byte byteAt(int ii)
          _more_
 byte[] copyBytes(int srcpos, byte[] dst, int dstpos, int nbytes)
          _more_
 int getLength()
          _more_
 byte[] toArray()
          _more_
 
Methods inherited from class ucar.unidata.util.ByteString.Concrete
subByteString, substring
 
Methods inherited from class ucar.unidata.util.ByteString
ByteToChar8859_1, charAt, CharToByte8859_1, compare, compare, compareTo, compareTo, compareTo, concat, concat, equals, equalS, format, hashCode, length, main, substring, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

length_

protected final int length_
_more_

Constructor Detail

ByteString.TrSubString

public ByteString.TrSubString(byte[] ba,
                              boolean share,
                              int length)
_more_

Parameters:
ba -
share -
length -

ByteString.TrSubString

public ByteString.TrSubString(ByteString.Concrete bs,
                              int length)
_more_

Parameters:
bs -
length -
Method Detail

getLength

public int getLength()
_more_

Overrides:
getLength in class ByteString.Concrete
Returns:
_more_

byteAt

public byte byteAt(int ii)
_more_

Overrides:
byteAt in class ByteString.Concrete
Parameters:
ii -
Returns:
_more_

copyBytes

public byte[] copyBytes(int srcpos,
                        byte[] dst,
                        int dstpos,
                        int nbytes)
_more_

Overrides:
copyBytes in class ByteString.Concrete
Parameters:
srcpos -
dst -
dstpos -
nbytes -
Returns:
_more_

toArray

public byte[] toArray()
_more_

Overrides:
toArray in class ByteString.Concrete
Returns:
_more_