com.hunnysoft.jmime
Class CharBuffer

java.lang.Object
  extended bycom.hunnysoft.jmime.CharBuffer

public class CharBuffer
extends java.lang.Object

Character buffer structure.

The CharBuffer class is used as a character buffer structure for various encoders and decoders.

See Also:
ByteBuffer

Field Summary
 char[] chars
          Character array that contains input data or that provides output buffer space.
 int endPos
          Offset of the end of the buffer.
 int pos
          Offset of the beginning of the buffer.
 
Constructor Summary
CharBuffer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chars

public char[] chars
Character array that contains input data or that provides output buffer space.


pos

public int pos
Offset of the beginning of the buffer.

For an input buffer, this value is the offset of the beginning of the unconsumed data in the char array. For an output buffer, this value is the offset of the beginning of the unused space in the char array. Offsets are zero-based.


endPos

public int endPos
Offset of the end of the buffer.

This value should be one larger than the offset of the last valid character position in chars. For example, if buf.chars[last] is the last valid char in the char array, then endPos should be set to last+1. Offsets are zero-based.

Constructor Detail

CharBuffer

public CharBuffer()