fixed string appends
[lwes-java.git] / src / org / lwes / serializer / DeserializerState.java
blob646f8607bd21b8ac64d0505ed78b46a75e4a6577
1 package org.lwes.serializer;
3 /**
4 * An internal class used by the Deserializer to keep track of its state
5 *
6 * @author Anthony Molinaro
7 */
8 public class DeserializerState
10 private int index;
12 /**
13 * Constructor
15 public DeserializerState()
17 index = 0;
20 /**
21 * Increments the index into a byte array, by a specified amount
22 * and returns the new index value.
24 * @param amount the amount to increment by
25 * @return the new index value as an int
27 public int incr(int amount)
29 index += amount;
30 return index;
33 /**
34 * return the current index
36 * @return the current index as an int
38 public int currentIndex()
40 return index;
43 /**
44 * reset the object to a clean state
47 public void reset()
49 index = 0;
52 /**
53 * Returns a String representation of this object
54 * Overrides method in <tt>Object</tt>
56 * @return a String return of this object.
58 public String toString()
60 return "DeserializeState = "+index;