sferyx.administration.htmlgenerator
Class HTMLGenerator

java.lang.Object
  sferyx.administration.htmlgenerator.HTMLGenerator

public class HTMLGenerator
extends java.lang.Object

General purpose HTML Generator - this class provides fully featured generation of HTML files from various sources containing RTF, Docx, Plain text or image content.


Field Summary
static boolean debug
           
 
Constructor Summary
HTMLGenerator()
          Creates a new instance of HTMLGenerator
 
Method Summary
 void addPageBreakToContentBuffer()
          Adds a HTML page break to the content buffer and all the content appended after that will be on the next page when printed
 void appendDocxToContentBuffer(java.io.File file)
          Appends the whole content of the Docx file from the File to the content buffer.
 void appendDocxToContentBuffer(java.net.URL file)
          Appends the whole content of the Docx file from the given URL to the content buffer.
 void appendHTMLContentToContentBuffer(java.lang.String content)
          Appends new HTML string to existing content buffer.
 void appendPlainTextContentToContentBuffer(java.lang.String content)
          Appends the Plain Text string content to the content buffer.
 void appendRTFBase64EncodedStringToContentBuffer(java.lang.String base64EncodedRTFString)
          Appends RTF content encoded as Base64 string to the content buffer.
 void appendRTFFileToContentBuffer(java.io.InputStream is)
          Appends RTF file from the InputStream to the content buffer.
 void appendRTFFileToContentBuffer(java.net.URL file)
          Appends RTF file from the URL to the content buffer.
 void clearContentBuffer()
          Closes the content buffer and clears the content.
 java.lang.String closeBufferAndGenerateHTML()
          Generates the HTML content automatically for given content buffer created prevuiously by using openContentBuffer() and appendContentXXX() methods.
 void closeBufferAndGenerateHTML(java.io.OutputStream destinationStream)
          Closes the existing content buffer and generates the resulting content from the HTML Generator - it will be saved in the given OutputStream.
 void closeBufferAndGenerateHTML(java.lang.String destinationFile)
          Generates the HTML content automatically for given content buffer created prevuiously by using openContentBuffer() and appendContentXXX() methods.
 java.lang.String generateHTMLFromContent(java.lang.String content)
          Generates HTML automatically for given image or HTML content.
 void generateHTMLFromContent(java.lang.String content, java.io.File destinationFile)
          Generates html automatically for given html content.
 void generateHTMLFromContent(java.lang.String content, java.io.OutputStream destinationStream)
          Generates HTML automatically for given image or html content.
 void generateHTMLFromContent(java.lang.String content, java.lang.String destinationFile)
          Generates the HTML automatically for given html content.
 java.lang.String generateHTMLFromDocxURL(java.lang.String sourceURL)
          Generates HTML automatically for given URL source containing a MS Word Docx file.
 void generateHTMLFromDocxURL(java.lang.String sourceURL, java.io.File destinationFile)
          Generates HTML automatically for given URL source containing a MS Word Docx file.
 void generateHTMLFromDocxURL(java.lang.String sourceURL, java.lang.String destinationFile)
          Generates HTML automatically for given URL source containing a MS Word Docx file.
 java.lang.String generateHTMLFromDocxURL(java.net.URL sourceURL)
          Generates HTML automatically for given URL source containing a MS Word Docx file.
 void generateHTMLFromDocxURL(java.net.URL sourceURL, java.io.File destinationFile)
          Generates HTML automatically for given URL source containing a MS Word Docx file.
 void generateHTMLFromDocxURL(java.net.URL sourceURL, java.io.OutputStream fos)
          Generates HTML automatically for given URL source containing a MS Word Docx file.
 java.lang.String generateHTMLFromPlainTextContent(java.lang.String content)
          Generates HTML automatically for given Plain text content.
 void generateHTMLFromPlainTextContent(java.lang.String content, java.io.File destinationFile)
          Generates HTML automatically for given Plain text content.
 void generateHTMLFromPlainTextContent(java.lang.String content, java.io.OutputStream destinationStream)
          Generates HTML automatically for given Plain text content.
 void generateHTMLFromPlainTextContent(java.lang.String content, java.lang.String destinationFile)
          Generates HTML automatically for given Plain text content.
 void generateHTMLFromRTFContentBase64String(java.lang.String rtfString, java.io.OutputStream outputStream)
          Generates HTML automatically for given URL source containing a base64 encoded Rich Text Format RTF string.
 java.lang.String generateHTMLFromRTFInputStream(java.io.InputStream rtfStream)
          Generates HTML automatically for given InputStream containing a Rich Text Format RTF file.
 void generateHTMLFromRTFInputStream(java.io.InputStream rtfStream, java.io.OutputStream outputStream)
          Generates HTML automatically for given InputStream containing a Rich Text Format RTF file.
 java.lang.String generateHTMLFromRTFURL(java.lang.String sourceURL)
          Generates HTML automatically for given URL source containing a Rich Text Format RTF file.
 void generateHTMLFromRTFURL(java.lang.String sourceURL, java.io.File destinationFile)
          Generates HTML automatically for given URL source containing a Rich Text Format RTF file.
 void generateHTMLFromRTFURL(java.lang.String sourceURL, java.lang.String destinationFile)
          Generates HTML automatically for given URL source containing a Rich Text Format RTF file.
 java.lang.String generateHTMLFromRTFURL(java.net.URL sourceURL)
          Generates HTML automatically for given URL source containing a Rich Text Format RTF file.
 void generateHTMLFromRTFURL(java.net.URL sourceURL, java.io.File destinationFile)
          Generates HTML automatically for given URL source containing a Rich Text Format RTF file.
 void generateHTMLFromRTFURL(java.net.URL sourceURL, java.io.OutputStream fos)
          Generates HTML automatically for given URL source containing a Rich Text Format RTF file.
 void generateHTMLFromURL(java.lang.String sourceURL)
          Generates HTML automatically for given URL source.
 void generateHTMLFromURL(java.lang.String sourceURL, java.io.File destinationFile)
          Generates HTML automatically for given URL source and saves the result to destinationFile as string.
 void generateHTMLFromURL(java.lang.String sourceURL, java.io.OutputStream destinationStream)
          Generates HTML automatically for given URL source and saves the result to the given OutputStream as a string.
 void generateHTMLFromURL(java.lang.String sourceURL, java.lang.String destinationFile)
          Generates HTML automatically for given URL source and saves the result to destinationFile as a string.
 java.lang.String generateHTMLFromURL(java.net.URL sourceURL)
          Generates HTML automatically for given URL source and saves the result will be returned as a String.
 void generateHTMLFromURL(java.net.URL sourceURL, java.io.OutputStream destinationStream)
          Generates HTML automatically for given URL source and saves the result to destinationStream as string.
 boolean getXMLMode()
          Returns the XML mode for the renderer.
static void main(java.lang.String[] args)
           
 void openContentBuffer()
          Opens the new content buffer for inserting content to be used for dynamic HTML generation.
 void setXMLMode(boolean mode)
          Sets the XML mode for the renderer - this will define how custom XML tags will be rendered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Constructor Detail

HTMLGenerator

public HTMLGenerator()
Creates a new instance of HTMLGenerator

Method Detail

generateHTMLFromURL

public void generateHTMLFromURL(java.lang.String sourceURL)
                         throws java.io.UnsupportedEncodingException,
                                java.io.IOException
Generates HTML automatically for given URL source. It will display a file dialog for to specify where the generated content should be saved. The content of the URL will be recognized automatically from Docx, RTF, TXT, Images etc. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromURL

public void generateHTMLFromURL(java.lang.String sourceURL,
                                java.lang.String destinationFile)
                         throws java.net.MalformedURLException,
                                java.io.UnsupportedEncodingException,
                                java.io.IOException
Generates HTML automatically for given URL source and saves the result to destinationFile as a string. The content of the URL will be recognized automatically from Docx, RTF, TXT, Images etc. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.net.MalformedURLException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromURL

public void generateHTMLFromURL(java.lang.String sourceURL,
                                java.io.OutputStream destinationStream)
                         throws java.net.MalformedURLException,
                                java.io.UnsupportedEncodingException,
                                java.io.IOException
Generates HTML automatically for given URL source and saves the result to the given OutputStream as a string. The content of the URL will be recognized automatically from Docx, RTF, TXT, Images etc. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.net.MalformedURLException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromURL

public void generateHTMLFromURL(java.lang.String sourceURL,
                                java.io.File destinationFile)
                         throws java.net.MalformedURLException,
                                java.io.UnsupportedEncodingException,
                                java.io.IOException
Generates HTML automatically for given URL source and saves the result to destinationFile as string. The content of the URL will be recognized automatically from Docx, RTF, TXT, Images etc. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.net.MalformedURLException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromURL

public void generateHTMLFromURL(java.net.URL sourceURL,
                                java.io.OutputStream destinationStream)
                         throws java.io.UnsupportedEncodingException,
                                java.io.IOException
Generates HTML automatically for given URL source and saves the result to destinationStream as string. The content of the URL will be recognized automatically from Docx, RTF, TXT, Images etc. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromURL

public java.lang.String generateHTMLFromURL(java.net.URL sourceURL)
                                     throws java.io.UnsupportedEncodingException,
                                            java.io.IOException
Generates HTML automatically for given URL source and saves the result will be returned as a String. The content of the URL will be recognized automatically from Docx, RTF, TXT, Images etc. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromDocxURL

public void generateHTMLFromDocxURL(java.lang.String sourceURL,
                                    java.lang.String destinationFile)
                             throws java.net.MalformedURLException,
                                    java.io.UnsupportedEncodingException,
                                    java.io.IOException
Generates HTML automatically for given URL source containing a MS Word Docx file. The result will be saved to the given destinationFile. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.net.MalformedURLException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromDocxURL

public void generateHTMLFromDocxURL(java.lang.String sourceURL,
                                    java.io.File destinationFile)
                             throws java.net.MalformedURLException,
                                    java.io.UnsupportedEncodingException,
                                    java.io.IOException
Generates HTML automatically for given URL source containing a MS Word Docx file. The result will be saved to the given destinationFile. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.net.MalformedURLException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromDocxURL

public void generateHTMLFromDocxURL(java.net.URL sourceURL,
                                    java.io.File destinationFile)
                             throws java.io.UnsupportedEncodingException,
                                    java.io.IOException
Generates HTML automatically for given URL source containing a MS Word Docx file. The result will be saved to the given destinationFile. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromDocxURL

public void generateHTMLFromDocxURL(java.net.URL sourceURL,
                                    java.io.OutputStream fos)
                             throws java.io.UnsupportedEncodingException,
                                    java.io.IOException
Generates HTML automatically for given URL source containing a MS Word Docx file. The result will be saved to the given OutputStream. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromDocxURL

public java.lang.String generateHTMLFromDocxURL(java.net.URL sourceURL)
                                         throws java.io.UnsupportedEncodingException,
                                                java.io.IOException
Generates HTML automatically for given URL source containing a MS Word Docx file. The result will be returned as a String. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromDocxURL

public java.lang.String generateHTMLFromDocxURL(java.lang.String sourceURL)
                                         throws java.io.UnsupportedEncodingException,
                                                java.io.IOException,
                                                java.net.MalformedURLException
Generates HTML automatically for given URL source containing a MS Word Docx file. The result will be returned as a String. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException
java.net.MalformedURLException

generateHTMLFromRTFURL

public void generateHTMLFromRTFURL(java.lang.String sourceURL,
                                   java.lang.String destinationFile)
                            throws java.net.MalformedURLException,
                                   java.io.UnsupportedEncodingException,
                                   java.io.IOException
Generates HTML automatically for given URL source containing a Rich Text Format RTF file. The result will be saved to the given destinationFile. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.net.MalformedURLException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromRTFURL

public void generateHTMLFromRTFURL(java.lang.String sourceURL,
                                   java.io.File destinationFile)
                            throws java.net.MalformedURLException,
                                   java.io.UnsupportedEncodingException,
                                   java.io.IOException
Generates HTML automatically for given URL source containing a Rich Text Format RTF file. The result will be saved to the given destinationFile. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.net.MalformedURLException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromRTFURL

public void generateHTMLFromRTFURL(java.net.URL sourceURL,
                                   java.io.File destinationFile)
                            throws java.io.FileNotFoundException,
                                   java.net.MalformedURLException,
                                   java.io.UnsupportedEncodingException,
                                   java.io.IOException
Generates HTML automatically for given URL source containing a Rich Text Format RTF file. The result will be saved to the given destinationFile. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.FileNotFoundException
java.net.MalformedURLException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromRTFURL

public void generateHTMLFromRTFURL(java.net.URL sourceURL,
                                   java.io.OutputStream fos)
                            throws java.io.IOException,
                                   java.io.UnsupportedEncodingException
Generates HTML automatically for given URL source containing a Rich Text Format RTF file. The result will be saved to the given OutputStream. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.IOException
java.io.UnsupportedEncodingException

generateHTMLFromRTFURL

public java.lang.String generateHTMLFromRTFURL(java.net.URL sourceURL)
                                        throws java.io.IOException,
                                               java.io.UnsupportedEncodingException
Generates HTML automatically for given URL source containing a Rich Text Format RTF file. The result will be returned as a String. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.IOException
java.io.UnsupportedEncodingException

generateHTMLFromRTFURL

public java.lang.String generateHTMLFromRTFURL(java.lang.String sourceURL)
                                        throws java.io.IOException,
                                               java.io.UnsupportedEncodingException,
                                               java.net.MalformedURLException
Generates HTML automatically for given URL source containing a Rich Text Format RTF file. The result will be returned as a String. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.IOException
java.io.UnsupportedEncodingException
java.net.MalformedURLException

generateHTMLFromRTFContentBase64String

public void generateHTMLFromRTFContentBase64String(java.lang.String rtfString,
                                                   java.io.OutputStream outputStream)
                                            throws java.io.UnsupportedEncodingException,
                                                   java.io.IOException
Generates HTML automatically for given URL source containing a base64 encoded Rich Text Format RTF string. The result will be saved to the given OutputStream. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromRTFInputStream

public void generateHTMLFromRTFInputStream(java.io.InputStream rtfStream,
                                           java.io.OutputStream outputStream)
                                    throws java.io.UnsupportedEncodingException,
                                           java.io.IOException
Generates HTML automatically for given InputStream containing a Rich Text Format RTF file. The result will be saved to the given OutputStream. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromRTFInputStream

public java.lang.String generateHTMLFromRTFInputStream(java.io.InputStream rtfStream)
                                                throws java.io.UnsupportedEncodingException,
                                                       java.io.IOException
Generates HTML automatically for given InputStream containing a Rich Text Format RTF file. The result will be returned as a String. All images will be embedded in the HTML code as base64 encoded strings

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

setXMLMode

public void setXMLMode(boolean mode)
Sets the XML mode for the renderer - this will define how custom XML tags will be rendered.


getXMLMode

public boolean getXMLMode()
Returns the XML mode for the renderer. The default is false


openContentBuffer

public void openContentBuffer()
Opens the new content buffer for inserting content to be used for dynamic HTML generation. This should be used in conjuction with closeBufferAndGeneratePDF() and appendXXXContentToContentBuffer(String content) methods.


appendHTMLContentToContentBuffer

public void appendHTMLContentToContentBuffer(java.lang.String content)
Appends new HTML string to existing content buffer. This should be used in conjuction with openContentBuffer() and closeBufferAndGeneratePDF(). The HTML content will be appended to existing content previously appended for example from Docx or RTF files. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.


appendPlainTextContentToContentBuffer

public void appendPlainTextContentToContentBuffer(java.lang.String content)
Appends the Plain Text string content to the content buffer. The Plain Text content will be appended to existing content previously appended for example from HTML, Docx or RTF files. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.


appendDocxToContentBuffer

public void appendDocxToContentBuffer(java.net.URL file)
Appends the whole content of the Docx file from the given URL to the content buffer. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.


appendDocxToContentBuffer

public void appendDocxToContentBuffer(java.io.File file)
Appends the whole content of the Docx file from the File to the content buffer. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.


appendRTFFileToContentBuffer

public void appendRTFFileToContentBuffer(java.net.URL file)
Appends RTF file from the URL to the content buffer. The newly converted HTML content will be appended to existing content previously appended for example from HTML, Text, Docx or RTF files. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.


appendRTFFileToContentBuffer

public void appendRTFFileToContentBuffer(java.io.InputStream is)
Appends RTF file from the InputStream to the content buffer. The newly converted HTML content will be appended to existing content previously appended for example from HTML, Text, Docx or RTF files. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.


appendRTFBase64EncodedStringToContentBuffer

public void appendRTFBase64EncodedStringToContentBuffer(java.lang.String base64EncodedRTFString)
Appends RTF content encoded as Base64 string to the content buffer. The newly convrted HTML content will be appended to existing content previously appended for example from HTML, Text, Docx or RTF files. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.


addPageBreakToContentBuffer

public void addPageBreakToContentBuffer()
Adds a HTML page break to the content buffer and all the content appended after that will be on the next page when printed


closeBufferAndGenerateHTML

public void closeBufferAndGenerateHTML(java.io.OutputStream destinationStream)
                                throws java.io.UnsupportedEncodingException,
                                       java.io.IOException
Closes the existing content buffer and generates the resulting content from the HTML Generator - it will be saved in the given OutputStream. This should be used in conjuction with openContentBuffer() and appendContentToContentBuffer(String content). These methods are very useful in environments where long content srings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

closeBufferAndGenerateHTML

public void closeBufferAndGenerateHTML(java.lang.String destinationFile)
                                throws java.io.UnsupportedEncodingException,
                                       java.io.IOException
Generates the HTML content automatically for given content buffer created prevuiously by using openContentBuffer() and appendContentXXX() methods. It will generate the file to the given destinationFile.

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

closeBufferAndGenerateHTML

public java.lang.String closeBufferAndGenerateHTML()
                                            throws java.io.UnsupportedEncodingException,
                                                   java.io.IOException
Generates the HTML content automatically for given content buffer created prevuiously by using openContentBuffer() and appendContentXXX() methods. The resulting content is returned as a String.

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

clearContentBuffer

public void clearContentBuffer()
Closes the content buffer and clears the content.


generateHTMLFromContent

public void generateHTMLFromContent(java.lang.String content,
                                    java.io.OutputStream destinationStream)
                             throws java.io.UnsupportedEncodingException,
                                    java.io.IOException
Generates HTML automatically for given image or html content. Images will be embedded in the HTML code as base64 encoded strings. It will generate the HTML file and save it to the given OutputStream.

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromContent

public java.lang.String generateHTMLFromContent(java.lang.String content)
                                         throws java.io.UnsupportedEncodingException,
                                                java.io.IOException
Generates HTML automatically for given image or HTML content. Images will be embedded in the HTML code as base64 encoded strings. It will generate the HTML file and return the resulting HTML String.

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromContent

public void generateHTMLFromContent(java.lang.String content,
                                    java.lang.String destinationFile)
                             throws java.io.FileNotFoundException,
                                    java.io.UnsupportedEncodingException,
                                    java.io.IOException
Generates the HTML automatically for given html content. Images will be embedded in the HTML code as base64 encoded strings. The resulting HTML content will be saved to the given destinationFile

Throws:
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromContent

public void generateHTMLFromContent(java.lang.String content,
                                    java.io.File destinationFile)
                             throws java.io.FileNotFoundException,
                                    java.io.UnsupportedEncodingException,
                                    java.io.IOException
Generates html automatically for given html content. Images will be embedded in the HTML code as base64 encoded strings. The resulting HTML content will be saved to the given destinationFile

Throws:
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromPlainTextContent

public java.lang.String generateHTMLFromPlainTextContent(java.lang.String content)
                                                  throws java.io.UnsupportedEncodingException,
                                                         java.io.IOException
Generates HTML automatically for given Plain text content. It will generate the HTML as a String

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromPlainTextContent

public void generateHTMLFromPlainTextContent(java.lang.String content,
                                             java.io.OutputStream destinationStream)
                                      throws java.io.UnsupportedEncodingException,
                                             java.io.IOException
Generates HTML automatically for given Plain text content. It will generate the HTML to the given OutputStream

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromPlainTextContent

public void generateHTMLFromPlainTextContent(java.lang.String content,
                                             java.lang.String destinationFile)
                                      throws java.io.UnsupportedEncodingException,
                                             java.io.IOException
Generates HTML automatically for given Plain text content. It will generate the HTML to the given destinationFile

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

generateHTMLFromPlainTextContent

public void generateHTMLFromPlainTextContent(java.lang.String content,
                                             java.io.File destinationFile)
                                      throws java.io.UnsupportedEncodingException,
                                             java.io.IOException
Generates HTML automatically for given Plain text content. It will generate the HTML to the given destinationFile

Throws:
java.io.UnsupportedEncodingException
java.io.IOException

main

public static void main(java.lang.String[] args)