Constructor and Description |
---|
MemBuilder(String name,
Parser parse)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addAttr(int name,
byte[] value,
int dist,
int uri)
Adds an attribute to the database.
|
protected void |
addDoc(byte[] value)
Adds a document node to the database.
|
protected void |
addElem(int dist,
int name,
int asize,
int uri,
boolean ne)
Adds an element node to the database.
|
protected void |
addText(byte[] value,
int dist,
byte kind)
Adds a text node to the database.
|
MemData |
build()
Builds the database.
|
static MemData |
build(IO input)
Builds a main memory database instance.
|
static MemData |
build(Parser parser)
Builds a main memory database instance.
|
static MemData |
build(String name,
Parser parser)
Builds a main memory database instance with the specified name.
|
void |
close()
Closes open references.
|
Data |
data()
Returns the data reference.
|
DataClip |
dataClip()
Returns a data clip with the parsed input.
|
void |
init()
Initializes the builder.
|
protected void |
setSize(int pre,
int size)
Stores a size value to the specified table position.
|
closeDoc, closeElem, comment, det, emptyElem, encoding, openDoc, openElem, pi, prog, text, tit
abort, checkStop, databases, detail, listen, proc, progress, registered, registered, startTimeout, stop, stopTimeout, title
public static MemData build(IO input) throws IOException
input
- inputIOException
- I/O exceptionpublic static MemData build(Parser parser) throws IOException
parser
- parserIOException
- I/O exceptionpublic static MemData build(String name, Parser parser) throws IOException
name
- name of databaseparser
- parserIOException
- I/O exceptionpublic MemData build() throws IOException
Builder
build
in class Builder
IOException
- I/O exceptionpublic DataClip dataClip() throws IOException
Builder
dataClip
in class Builder
IOException
- I/O exceptionpublic void init()
public Data data()
public void close() throws IOException
Builder
close
in class Builder
IOException
- I/O exceptionprotected void addDoc(byte[] value)
Builder
protected void addElem(int dist, int name, int asize, int uri, boolean ne)
Builder
Builder.setSize(int, int)
must
be called to set the final size value.protected void addAttr(int name, byte[] value, int dist, int uri)
Builder
protected void addText(byte[] value, int dist, byte kind)
Builder
Copyright © 2005–2015 BaseX Team. All rights reserved.