Class SimpleNamedDestination

    • Method Detail

      • exportToXML

        public static void exportToXML​(HashMap<String,​String> names,
                                       OutputStream out,
                                       String encoding,
                                       boolean onlyASCII)
                                throws IOException
        Exports the destinations to XML. The DTD for this XML is:

         <?xml version='1.0' encoding='UTF-8'?>
         <!ELEMENT Name (#PCDATA)>
         <!ATTLIST Name
            Page CDATA #IMPLIED
         >
         <!ELEMENT Destination (Name)*>
         
        Parameters:
        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
        Throws:
        IOException - on error
        Since:
        5.0.1 (generic type in signature)
      • exportToXML

        public static void exportToXML​(HashMap<String,​String> names,
                                       Writer wrt,
                                       String encoding,
                                       boolean onlyASCII)
                                throws IOException
        Exports the destinations to XML.
        Parameters:
        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
        Throws:
        IOException - on error
        Since:
        5.0.1 (generic type in signature)
      • importFromXML

        public static HashMap<String,​String> importFromXML​(Reader in)
                                                          throws IOException
        Import the names from XML.
        Parameters:
        in - the XML source. The reader is not closed
        Returns:
        the names
        Throws:
        IOException - on error
      • escapeBinaryString

        public static String escapeBinaryString​(String s)
      • unEscapeBinaryString

        public static String unEscapeBinaryString​(String s)
      • text

        public void text​(String str)
        Description copied from interface: SimpleXMLDocHandler
        Called when a text element is found.
        Specified by:
        text in interface SimpleXMLDocHandler
        Parameters:
        str - the text element, probably a fragment.