edu.usc.bg.base
Class ObjectByteIterator

java.lang.Object
  extended by edu.usc.bg.base.ByteIterator
      extended by edu.usc.bg.base.ObjectByteIterator
All Implemented Interfaces:
java.util.Iterator<java.lang.Byte>

public class ObjectByteIterator
extends ByteIterator


Constructor Summary
ObjectByteIterator(byte[] s)
           
 
Method Summary
 long bytesLeft()
           
static java.util.HashMap<java.lang.String,ByteIterator> getByteIteratorMap(java.util.Map<java.lang.String,java.lang.String> m)
          Create a copy of a map, converting the values from Strings to StringByteIterators.
static java.util.HashMap<java.lang.String,java.lang.String> getStringMap(java.util.Map<java.lang.String,ByteIterator> m)
          Create a copy of a map, converting the values from StringByteIterators to Strings.
 boolean hasNext()
           
 byte nextByte()
           
static void putAllAsByteIterators(java.util.Map<java.lang.String,ByteIterator> out, java.util.Map<java.lang.String,java.lang.String> in)
          Put all of the entries of one map into the other, converting String values into ByteIterators.
static void putAllAsStrings(java.util.Map<java.lang.String,java.lang.String> out, java.util.Map<java.lang.String,ByteIterator> in)
          Put all of the entries of one map into the other, converting ByteIterator values into Strings.
 int resetOffset()
           
 java.lang.String toString()
          Specialization of general purpose toString() to avoid unnecessary copies.
 
Methods inherited from class edu.usc.bg.base.ByteIterator
next, nextBuf, remove, toArray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectByteIterator

public ObjectByteIterator(byte[] s)
Method Detail

putAllAsByteIterators

public static void putAllAsByteIterators(java.util.Map<java.lang.String,ByteIterator> out,
                                         java.util.Map<java.lang.String,java.lang.String> in)
Put all of the entries of one map into the other, converting String values into ByteIterators.


putAllAsStrings

public static void putAllAsStrings(java.util.Map<java.lang.String,java.lang.String> out,
                                   java.util.Map<java.lang.String,ByteIterator> in)
Put all of the entries of one map into the other, converting ByteIterator values into Strings.


getByteIteratorMap

public static java.util.HashMap<java.lang.String,ByteIterator> getByteIteratorMap(java.util.Map<java.lang.String,java.lang.String> m)
Create a copy of a map, converting the values from Strings to StringByteIterators.


getStringMap

public static java.util.HashMap<java.lang.String,java.lang.String> getStringMap(java.util.Map<java.lang.String,ByteIterator> m)
Create a copy of a map, converting the values from StringByteIterators to Strings.


hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<java.lang.Byte>
Specified by:
hasNext in class ByteIterator

nextByte

public byte nextByte()
Specified by:
nextByte in class ByteIterator

bytesLeft

public long bytesLeft()
Specified by:
bytesLeft in class ByteIterator

toString

public java.lang.String toString()
Specialization of general purpose toString() to avoid unnecessary copies.

Creating a new StringByteIterator, then calling toString() yields the original String object, and does not perform any copies or String conversion operations.

Overrides:
toString in class ByteIterator

resetOffset

public int resetOffset()