com.ximpleware.extended
Class VTDGenHuge

java.lang.Object
  extended by com.ximpleware.extended.VTDGenHuge

public class VTDGenHuge
extends Object

VTDGenHuge implementation supporting extended VTD (256GB file size). Current support built-in entities only It parses DTD, but doesn't resolve declared entities


Field Summary
 long[] attr_name_array
           
protected  boolean br
           
protected  int depth
           
protected  long docLen
           
protected  long docOffset
           
protected  int encoding
           
protected  long endOffset
           
static int FORMAT_ASCII
           
static int FORMAT_ISO_8859_1
           
static int FORMAT_ISO_8859_10
           
static int FORMAT_ISO_8859_11
           
static int FORMAT_ISO_8859_12
           
static int FORMAT_ISO_8859_13
           
static int FORMAT_ISO_8859_14
           
static int FORMAT_ISO_8859_15
           
static int FORMAT_ISO_8859_16
           
static int FORMAT_ISO_8859_2
           
static int FORMAT_ISO_8859_3
           
static int FORMAT_ISO_8859_4
           
static int FORMAT_ISO_8859_5
           
static int FORMAT_ISO_8859_6
           
static int FORMAT_ISO_8859_7
           
static int FORMAT_ISO_8859_8
           
static int FORMAT_ISO_8859_9
           
static int FORMAT_UTF_16BE
           
static int FORMAT_UTF_16LE
           
static int FORMAT_UTF8
           
static int FORMAT_WIN_1250
           
static int FORMAT_WIN_1251
           
static int FORMAT_WIN_1252
           
static int FORMAT_WIN_1253
           
static int FORMAT_WIN_1254
           
static int FORMAT_WIN_1255
           
static int FORMAT_WIN_1256
           
static int FORMAT_WIN_1257
           
static int FORMAT_WIN_1258
           
static int IN_MEMORY
           
protected  FastLongBuffer l1Buffer
           
protected  FastLongBuffer l2Buffer
           
protected  FastIntBuffer l3Buffer
           
static int MAX_DEPTH
           
static int MAX_PREFIX_LENGTH
           
static int MAX_QNAME_LENGTH
           
static int MAX_TOKEN_LENGTH
           
static int MEM_MAPPED
           
protected  boolean ns
           
protected  long offset
           
protected  long prev_offset
           
protected  com.ximpleware.extended.IReader r
           
protected  int rootIndex
           
protected  long[] tag_stack
           
static int TOKEN_ATTR_NAME
           
static int TOKEN_ATTR_NS
           
static int TOKEN_ATTR_VAL
           
static int TOKEN_CDATA_VAL
           
static int TOKEN_CHARACTER_DATA
           
static int TOKEN_COMMENT
           
static int TOKEN_DEC_ATTR_NAME
           
static int TOKEN_DEC_ATTR_VAL
           
static int TOKEN_DOCUMENT
           
static int TOKEN_DTD_VAL
           
static int TOKEN_ENDING_TAG
           
static int TOKEN_PI_NAME
           
static int TOKEN_PI_VAL
           
static int TOKEN_STARTING_TAG
           
protected  FastLongBuffer VTDBuffer
           
protected  int VTDDepth
           
protected  IByteBuffer xb
           
 
Constructor Summary
VTDGenHuge()
          VTDGenHuge constructor method.
 
Method Summary
 void clear()
          Clear internal states so VTDGEn can process the next file.
 VTDNavHuge getNav()
          This method returns the VTDNavHuge object after parsing, it also cleans internal state so VTDGenHuge can process the next file.
 void parse(boolean NS)
          Generating VTD tokens and Location cache info.
 boolean parseFile(String fileName, boolean ns)
          parseFile with default mode set to IN_MEMORY
 boolean parseFile(String fileName, boolean ns, int mode)
          This method parses the XML file and returns a boolean indicating if it is successful or not.
 void setDoc(IByteBuffer xb1)
          Set the XMLDoc container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IN_MEMORY

public static final int IN_MEMORY
See Also:
Constant Field Values

MEM_MAPPED

public static final int MEM_MAPPED
See Also:
Constant Field Values

TOKEN_STARTING_TAG

public static final int TOKEN_STARTING_TAG
See Also:
Constant Field Values

TOKEN_ENDING_TAG

public static final int TOKEN_ENDING_TAG
See Also:
Constant Field Values

TOKEN_ATTR_NAME

public static final int TOKEN_ATTR_NAME
See Also:
Constant Field Values

TOKEN_ATTR_NS

public static final int TOKEN_ATTR_NS
See Also:
Constant Field Values

TOKEN_ATTR_VAL

public static final int TOKEN_ATTR_VAL
See Also:
Constant Field Values

TOKEN_CHARACTER_DATA

public static final int TOKEN_CHARACTER_DATA
See Also:
Constant Field Values

TOKEN_COMMENT

public static final int TOKEN_COMMENT
See Also:
Constant Field Values

TOKEN_PI_NAME

public static final int TOKEN_PI_NAME
See Also:
Constant Field Values

TOKEN_PI_VAL

public static final int TOKEN_PI_VAL
See Also:
Constant Field Values

TOKEN_DEC_ATTR_NAME

public static final int TOKEN_DEC_ATTR_NAME
See Also:
Constant Field Values

TOKEN_DEC_ATTR_VAL

public static final int TOKEN_DEC_ATTR_VAL
See Also:
Constant Field Values

TOKEN_CDATA_VAL

public static final int TOKEN_CDATA_VAL
See Also:
Constant Field Values

TOKEN_DTD_VAL

public static final int TOKEN_DTD_VAL
See Also:
Constant Field Values

TOKEN_DOCUMENT

public static final int TOKEN_DOCUMENT
See Also:
Constant Field Values

FORMAT_UTF8

public static final int FORMAT_UTF8
See Also:
Constant Field Values

FORMAT_ASCII

public static final int FORMAT_ASCII
See Also:
Constant Field Values

FORMAT_ISO_8859_1

public static final int FORMAT_ISO_8859_1
See Also:
Constant Field Values

FORMAT_ISO_8859_2

public static final int FORMAT_ISO_8859_2
See Also:
Constant Field Values

FORMAT_ISO_8859_3

public static final int FORMAT_ISO_8859_3
See Also:
Constant Field Values

FORMAT_ISO_8859_4

public static final int FORMAT_ISO_8859_4
See Also:
Constant Field Values

FORMAT_ISO_8859_5

public static final int FORMAT_ISO_8859_5
See Also:
Constant Field Values

FORMAT_ISO_8859_6

public static final int FORMAT_ISO_8859_6
See Also:
Constant Field Values

FORMAT_ISO_8859_7

public static final int FORMAT_ISO_8859_7
See Also:
Constant Field Values

FORMAT_ISO_8859_8

public static final int FORMAT_ISO_8859_8
See Also:
Constant Field Values

FORMAT_ISO_8859_9

public static final int FORMAT_ISO_8859_9
See Also:
Constant Field Values

FORMAT_ISO_8859_10

public static final int FORMAT_ISO_8859_10
See Also:
Constant Field Values

FORMAT_ISO_8859_11

public static final int FORMAT_ISO_8859_11
See Also:
Constant Field Values

FORMAT_ISO_8859_12

public static final int FORMAT_ISO_8859_12
See Also:
Constant Field Values

FORMAT_ISO_8859_13

public static final int FORMAT_ISO_8859_13
See Also:
Constant Field Values

FORMAT_ISO_8859_14

public static final int FORMAT_ISO_8859_14
See Also:
Constant Field Values

FORMAT_ISO_8859_15

public static final int FORMAT_ISO_8859_15
See Also:
Constant Field Values

FORMAT_ISO_8859_16

public static final int FORMAT_ISO_8859_16
See Also:
Constant Field Values

FORMAT_WIN_1250

public static final int FORMAT_WIN_1250
See Also:
Constant Field Values

FORMAT_WIN_1251

public static final int FORMAT_WIN_1251
See Also:
Constant Field Values

FORMAT_WIN_1252

public static final int FORMAT_WIN_1252
See Also:
Constant Field Values

FORMAT_WIN_1253

public static final int FORMAT_WIN_1253
See Also:
Constant Field Values

FORMAT_WIN_1254

public static final int FORMAT_WIN_1254
See Also:
Constant Field Values

FORMAT_WIN_1255

public static final int FORMAT_WIN_1255
See Also:
Constant Field Values

FORMAT_WIN_1256

public static final int FORMAT_WIN_1256
See Also:
Constant Field Values

FORMAT_WIN_1257

public static final int FORMAT_WIN_1257
See Also:
Constant Field Values

FORMAT_WIN_1258

public static final int FORMAT_WIN_1258
See Also:
Constant Field Values

FORMAT_UTF_16LE

public static final int FORMAT_UTF_16LE
See Also:
Constant Field Values

FORMAT_UTF_16BE

public static final int FORMAT_UTF_16BE
See Also:
Constant Field Values

ns

protected boolean ns

VTDDepth

protected int VTDDepth

encoding

protected int encoding

offset

protected long offset

depth

protected int depth

prev_offset

protected long prev_offset

rootIndex

protected int rootIndex

xb

protected IByteBuffer xb

VTDBuffer

protected FastLongBuffer VTDBuffer

l1Buffer

protected FastLongBuffer l1Buffer

l2Buffer

protected FastLongBuffer l2Buffer

l3Buffer

protected FastIntBuffer l3Buffer

br

protected boolean br

docLen

protected long docLen

endOffset

protected long endOffset

tag_stack

protected long[] tag_stack

attr_name_array

public long[] attr_name_array

MAX_DEPTH

public static final int MAX_DEPTH
See Also:
Constant Field Values

docOffset

protected long docOffset

MAX_PREFIX_LENGTH

public static final int MAX_PREFIX_LENGTH
See Also:
Constant Field Values

MAX_QNAME_LENGTH

public static final int MAX_QNAME_LENGTH
See Also:
Constant Field Values

MAX_TOKEN_LENGTH

public static final int MAX_TOKEN_LENGTH
See Also:
Constant Field Values

r

protected com.ximpleware.extended.IReader r
Constructor Detail

VTDGenHuge

public VTDGenHuge()
VTDGenHuge constructor method.

Method Detail

clear

public void clear()
Clear internal states so VTDGEn can process the next file.


getNav

public VTDNavHuge getNav()
This method returns the VTDNavHuge object after parsing, it also cleans internal state so VTDGenHuge can process the next file.

Returns:
com.ximpleware.extended.VTDNavHuge

parseFile

public boolean parseFile(String fileName,
                         boolean ns,
                         int mode)
This method parses the XML file and returns a boolean indicating if it is successful or not.

Parameters:
fileName -
ns - namespace aware or not
mode - indicates whether the file is loaded in memory of memory mapped
Returns:
boolean indicating whether the parseFile is a success

parseFile

public boolean parseFile(String fileName,
                         boolean ns)
parseFile with default mode set to IN_MEMORY

Parameters:
fileName -
ns -
Returns:
boolean indicating whether the parseFile is a success

parse

public void parse(boolean NS)
           throws EncodingExceptionHuge,
                  EOFExceptionHuge,
                  EntityExceptionHuge,
                  ParseExceptionHuge
Generating VTD tokens and Location cache info.

Parameters:
NS - boolean Enable namespace or not
Throws:
ParseExceptionHuge - Super class for any exceptions during parsing.
EOFExceptionHuge - End of file exception.
EntityExceptionHuge - Entity resolution exception.
EncodingExceptionHuge - UTF/native encoding exception.

setDoc

public void setDoc(IByteBuffer xb1)
Set the XMLDoc container.

Parameters:
XMLBuffer - xb1


Copyright © 2013. All Rights Reserved.