GXPARSE hosted by SourceForge.net Logo

ca.gorman.util.scan
Interface InputControl

All Superinterfaces:
Expandable
All Known Implementing Classes:
AbstractReaderBuffer, InputControl.Default

public interface InputControl
extends Expandable

Control interface for a buffer with modifiable content and capacity.


Nested Class Summary
static class InputControl.Default
           An implementation of InputControl with methods that do nothing.
 
Method Summary
 int discard(int index)
           Discard a leading prefix of characters from the buffer.
 int fill()
           Make more characters available in a buffer with free space.
 
Methods inherited from interface ca.gorman.util.scan.Expandable
expand
 

Method Detail

discard

int discard(int index)

Discard a leading prefix of characters from the buffer.

Parameters:
index - The number of characters to be discarded
Returns:
The number (from zero to the number requested) of characters discarded
Throws:
IndexOutOfBoundsException - if index is negative or greater than the number of characters avaialable

fill

int fill()
         throws IOException

Make more characters available in a buffer with free space.

Returns:
the number (possibly zero) of additional characters made available, or a negative number to indicate that additional chaacters will never be available.
Throws:
IOException

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License