public final class SimpleNamedDestination extends Object implements SimpleXMLDocHandler
Modifier and Type | Method and Description |
---|---|
void |
endDocument()
Called after the document is parsed.
|
void |
endElement(String tag)
Called when an end tag is found.
|
static String |
escapeBinaryString(String s) |
static void |
exportToXML(HashMap<String,String> names, OutputStream out, String encoding, boolean onlyASCII)
Exports the destinations to XML.
|
static void |
exportToXML(HashMap<String,String> names, Writer wrt, String encoding, boolean onlyASCII)
Exports the destinations to XML.
|
static HashMap<String,String> |
getNamedDestination(PdfReader reader, boolean fromNames) |
static HashMap<String,String> |
importFromXML(InputStream in)
Import the names from XML.
|
static HashMap<String,String> |
importFromXML(Reader in)
Import the names from XML.
|
static PdfDictionary |
outputNamedDestinationAsNames(HashMap<String,String> names, PdfWriter writer) |
static PdfDictionary |
outputNamedDestinationAsStrings(HashMap<String,String> names, PdfWriter writer) |
void |
startDocument()
Called when the document starts to be parsed.
|
void |
startElement(String tag, Map<String,String> h)
Called when a start tag is found.
|
void |
text(String str)
Called when a text element is found.
|
static String |
unEscapeBinaryString(String s) |
public static HashMap<String,String> getNamedDestination(PdfReader reader, boolean fromNames)
public static void exportToXML(HashMap<String,String> names, OutputStream out, String encoding, boolean onlyASCII) throws IOException
names
- the names
out
- the export destination. The stream is not closed
encoding
- the encoding according to IANA conventions
onlyASCII
- codes above 127 will always be escaped with nn; if true
, whatever the encoding
IOException
- on error
public static void exportToXML(HashMap<String,String> names, Writer wrt, String encoding, boolean onlyASCII) throws IOException
names
- the names
wrt
- the export destination. The writer is not closed
encoding
- the encoding according to IANA conventions
onlyASCII
- codes above 127 will always be escaped with nn; if true
, whatever the encoding
IOException
- on error
public static HashMap<String,String> importFromXML(InputStream in) throws IOException
in
- the XML source. The stream is not closed
IOException
- on error
public static HashMap<String,String> importFromXML(Reader in) throws IOException
in
- the XML source. The reader is not closed
IOException
- on error
public static PdfDictionary outputNamedDestinationAsNames(HashMap<String,String> names, PdfWriter writer)
public static PdfDictionary outputNamedDestinationAsStrings(HashMap<String,String> names, PdfWriter writer) throws IOException
IOException
public void endDocument()
SimpleXMLDocHandler
endDocument
in interface SimpleXMLDocHandler
public void endElement(String tag)
SimpleXMLDocHandler
endElement
in interface SimpleXMLDocHandler
tag
- the tag name
public void startDocument()
SimpleXMLDocHandler
startDocument
in interface SimpleXMLDocHandler
public void startElement(String tag, Map<String,String> h)
SimpleXMLDocHandler
startElement
in interface SimpleXMLDocHandler
tag
- the tag name
h
- the tag's attributes
public void text(String str)
SimpleXMLDocHandler
text
in interface SimpleXMLDocHandler
str
- the text element, probably a fragment.
Copyright © 2016. All rights reserved.