public class XMLStreamReader
extends java.lang.Object
implements java.io.Closeable
Constructor and Description |
---|
XMLStreamReader() |
Modifier and Type | Method and Description |
---|---|
XMLBlock |
advanceToTag(java.lang.String tagname) |
void |
breakOnWhitespace(boolean brk) |
void |
close()
Closes the TMX file
|
java.util.List<XMLBlock> |
closeBlock(XMLBlock block) |
java.util.List<XMLBlock> |
closeBlock(XMLBlock block,
boolean includeTerminationBlock) |
void |
compressWhitespace(boolean tof) |
XMLBlock |
getHeadBlock() |
XMLBlock |
getNextBlock()
Returns next object in stream - either a tag or a string.
|
void |
killEmptyBlocks() |
java.lang.String |
makeValidXML(int cp)
Converts a single code point into valid XML.
|
java.lang.String |
makeValidXML(java.lang.String plaintext)
Converts a stream of plaintext into valid XML.
|
void |
setEntityFilter(DefaultEntityFilter filter) |
void |
setStream(java.io.File name) |
void |
setStream(java.io.InputStream stream)
Provide an interface where stream can be opened elsewhere.
|
void |
setStream(java.io.InputStream stream,
java.lang.String encoding)
Provide an interface where stream can be opened elsewhere.
|
void |
setStream(java.lang.String name,
java.lang.String encoding) |
public final void setStream(java.io.File name) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException, TranslationException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
TranslationException
public final void setStream(java.lang.String name, java.lang.String encoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException, TranslationException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
TranslationException
public void setStream(java.io.InputStream stream) throws java.io.IOException, TranslationException
java.io.IOException
TranslationException
public void setStream(java.io.InputStream stream, java.lang.String encoding) throws java.io.IOException, TranslationException
java.io.IOException
TranslationException
public XMLBlock getNextBlock() throws TranslationException
TranslationException
public final void killEmptyBlocks()
public final void breakOnWhitespace(boolean brk)
public final void compressWhitespace(boolean tof)
public final void setEntityFilter(DefaultEntityFilter filter)
public java.lang.String makeValidXML(int cp)
public java.lang.String makeValidXML(java.lang.String plaintext)
public final java.util.List<XMLBlock> closeBlock(XMLBlock block) throws TranslationException
TranslationException
public java.util.List<XMLBlock> closeBlock(XMLBlock block, boolean includeTerminationBlock) throws TranslationException
TranslationException
public final XMLBlock advanceToTag(java.lang.String tagname) throws TranslationException
TranslationException
public final XMLBlock getHeadBlock()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException