CORBA-JAVA
view release on metacpan or search on metacpan
javaxml/XMLInputStreamImpl.java view on Meta::CPAN
//////////////////////////////////////////////////////////////////////
/**
* Re-initialize the variables for each parse.
*/
private void initializeVariables ()
{
// First line
line = 1;
column = 0;
// Set up the buffers for data and names
dataBufferPos = 0;
dataBuffer = new char [DATA_BUFFER_INITIAL];
nameBufferPos = 0;
nameBuffer = new char [NAME_BUFFER_INITIAL];
// Set up the DTD hash tables
entityInfo = new Hashtable<String, Object[]> ();
// Set up the variables for the current
// element context.
currentElement = null;
// Set up the input variables
sourceType = INPUT_NONE;
inputStack = new Stack<Object[]> ();
readBufferOverflow = -1;
symbolTable = new Object [SYMBOL_TABLE_LENGTH][];
}
/**
* Clean up after the parse to allow some garbage collection.
*/
private void cleanupVariables ()
{
dataBuffer = null;
nameBuffer = null;
entityInfo = null;
currentElement = null;
inputStack = null;
symbolTable = null;
}
//
// I/O information.
//
private Stack<Object[]> inputStack; // stack of input soruces
private int line; // current line number
private int column; // current column number
private int sourceType; // type of input source
private int currentByteCount; // bytes read from current source
//
// Buffers for decoded but unparsed character input.
//
private char readBuffer [];
private int readBufferPos;
private int readBufferLength;
private int readBufferOverflow; // overflow from last data chunk.
//
// Buffer for undecoded raw byte input.
//
private final static int READ_BUFFER_MAX = 16384;
//
// Buffer for parsed character data.
//
private static int DATA_BUFFER_INITIAL = 4096;
private char dataBuffer [];
private int dataBufferPos;
//
// Buffer for parsed names.
//
private static int NAME_BUFFER_INITIAL = 1024;
private char nameBuffer [];
private int nameBufferPos;
//
// Hashtables for DTD information on elements, entities, and notations.
//
private Hashtable<String, Object[]> entityInfo;
//
// Element type currently in force.
//
private String currentElement;
//
// Symbol table, for caching interned names.
//
private final static int SYMBOL_TABLE_LENGTH = 1087;
private Object symbolTable [][];
//
// Utility flag: have we noticed a CR while reading the last
// data chunk? If so, we will have to go back and normalise
// CR or CR/LF line ends.
//
private boolean sawCR;
}
( run in 0.947 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )