| Modifier and Type | Class and Description |
|---|---|
| private static class | HtmlUtils.MyByteArrayOutputStream
Private implementation of ByteArrayOutputStream. |
| Modifier and Type | Field and Description |
|---|---|
| private static char | |
| private static final char[] | |
| private static String[] | |
| private static String[] | |
| private static String[] | |
| private static final char[] | |
| private static final BitSet | |
| private static String[][] | |
| private static final char[] | |
| private static String[] | |
| private static final char[] | |
| private static String[] | |
| private static String[] | |
| private static String[] | |
| private static final char[] | |
| private static final int | |
| private static String[] | |
| private static String[] | |
| private static final char[] | |
| private static char[][] | |
| private static final Set |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static int | _writeDecRef(Writer out, char[] buffer, int bufferIndex, int bufferLength, char ch)
Writes a character as a decimal escape. |
| private static int | addToBuffer(Writer out, char[] buffer, int bufferIndex, int bufferLength, char ch)
Add a character to the buffer, flushing the buffer if the buffer is full, and returning the new buffer index |
| private static int | addToBuffer(Writer out, char[] buffer, int bufferIndex, int bufferLength, char[] toAdd)
Add an array of characters to the buffer, flushing the buffer if the buffer is full, and returning the new buffer index. |
| private static void | |
| private static void | |
| private static int | flushBuffer(Writer out, char[] buffer, int bufferIndex)
Flush the contents of the buffer to the output stream and return the reset buffer index |
| private static char | |
| private static boolean | |
| private static boolean | |
| public static boolean | |
| public static boolean | |
| private static boolean | |
| public static boolean | |
| public static boolean | |
| public static void | writeAttribute(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buff, String text, char[] textBuff, boolean isScriptInAttributeValueEnabled)
Write a string attribute. |
| public static void | writeAttribute(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buffer, char[] text)
|
| public static void | writeAttribute(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buff, char[] text, int start, int length, boolean isScriptInAttributeValueEnabled)
Write a character array attribute. |
| public static void | |
| public static void | |
| public static void | |
| private static int | writeTextChar(Writer out, boolean escapeUnicode, boolean escapeIsocode, char ch, int buffIndex, char[] buff, int buffLength)
|
| public static void | |
| public static void | |
| private static void | |
| public static void | |
| public static void |
| _LAST_EMPTY_ELEMENT_START | back to summary |
|---|---|
| private static char _LAST_EMPTY_ELEMENT_START | |
| AMP_CHARS | back to summary |
|---|---|
| private static final char[] AMP_CHARS | |
| aNames | back to summary |
|---|---|
| private static String[] aNames | |
| bNames | back to summary |
|---|---|
| private static String[] bNames | |
| cNames | back to summary |
|---|---|
| private static String[] cNames | |
| DEC_REF_START | back to summary |
|---|---|
| private static final char[] DEC_REF_START | |
| DONT_ENCODE_SET | back to summary |
|---|---|
| private static final BitSet DONT_ENCODE_SET | |
| emptyElementArr | back to summary |
|---|---|
| private static String[][] emptyElementArr | |
| EURO_CHARS | back to summary |
|---|---|
| private static final char[] EURO_CHARS | |
| fNames | back to summary |
|---|---|
| private static String[] fNames | |
| GT_CHARS | back to summary |
|---|---|
| private static final char[] GT_CHARS | |
| hNames | back to summary |
|---|---|
| private static String[] hNames | |
| iNames | back to summary |
|---|---|
| private static String[] iNames | |
| lNames | back to summary |
|---|---|
| private static String[] lNames | |
| LT_CHARS | back to summary |
|---|---|
| private static final char[] LT_CHARS | |
| MAX_BYTES_PER_CHAR | back to summary |
|---|---|
| private static final int MAX_BYTES_PER_CHAR | |
| mNames | back to summary |
|---|---|
| private static String[] mNames | |
| pNames | back to summary |
|---|---|
| private static String[] pNames | |
| QUOT_CHARS | back to summary |
|---|---|
| private static final char[] QUOT_CHARS | |
| sISO8859_1_Entities | back to summary |
|---|---|
| private static char[][] sISO8859_1_Entities | |
| UTF_CHARSET | back to summary |
|---|---|
| private static final Set<String> UTF_CHARSET | |
| HtmlUtils | back to summary |
|---|---|
| private HtmlUtils() | |
| _writeDecRef | back to summary |
|---|---|
| private static int _writeDecRef(Writer out, char[] buffer, int bufferIndex, int bufferLength, char ch) throws IOException Writes a character as a decimal escape. Hex escapes are smaller than the decimal version, but Netscape didn't support hex escapes until 4.7.4. | |
| addToBuffer | back to summary |
|---|---|
| private static int addToBuffer(Writer out, char[] buffer, int bufferIndex, int bufferLength, char ch) throws IOException Add a character to the buffer, flushing the buffer if the buffer is full, and returning the new buffer index | |
| addToBuffer | back to summary |
|---|---|
| private static int addToBuffer(Writer out, char[] buffer, int bufferIndex, int bufferLength, char[] toAdd) throws IOException Add an array of characters to the buffer, flushing the buffer if the buffer is full, and returning the new buffer index. | |
| encodeURIString | back to summary |
|---|---|
| private static void encodeURIString(Writer out, String text, String encoding, int start) throws IOException | |
| encodeURIString | back to summary |
|---|---|
| private static void encodeURIString(Writer out, char[] textBuff, String encoding, int start, int end) throws IOException | |
| flushBuffer | back to summary |
|---|---|
| private static int flushBuffer(Writer out, char[] buffer, int bufferIndex) throws IOException Flush the contents of the buffer to the output stream and return the reset buffer index | |
| intToHex | back to summary |
|---|---|
| private static char intToHex(int i) | |
| isAmpEscaped | back to summary |
|---|---|
| private static boolean isAmpEscaped(String text, int idx) | |
| isAmpEscaped | back to summary |
|---|---|
| private static boolean isAmpEscaped(char[] text, int idx) | |
| isEmptyElement | back to summary |
|---|---|
| public static boolean isEmptyElement(String name) | |
| isISO8859_1encoding | back to summary |
|---|---|
| public static boolean isISO8859_1encoding(String encoding) | |
| isPrintableControlChar | back to summary |
|---|---|
| private static boolean isPrintableControlChar(int ch) | |
| isUTFencoding | back to summary |
|---|---|
| public static boolean isUTFencoding(String encoding) | |
| validateEncoding | back to summary |
|---|---|
| public static boolean validateEncoding(String encoding) | |
| writeAttribute | back to summary |
|---|---|
| public static void writeAttribute(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buff, String text, char[] textBuff, boolean isScriptInAttributeValueEnabled) throws IOException Write a string attribute. Note that this code is duplicated below for character arrays - change both places if you make any changes!!! | |
| writeAttribute | back to summary |
|---|---|
| public static void writeAttribute(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buffer, char[] text) throws IOException | |
| writeAttribute | back to summary |
|---|---|
| public static void writeAttribute(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buff, char[] text, int start, int length, boolean isScriptInAttributeValueEnabled) throws IOException Write a character array attribute. Note that this code is duplicated above for string - change both places if you make any changes!!! | |
| writeText | back to summary |
|---|---|
| public static void writeText(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buffer, char[] text) throws IOException | |
| writeText | back to summary |
|---|---|
| public static void writeText(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buff, char[] text, int start, int length) throws IOException Write char array text. | |
| writeText | back to summary |
|---|---|
| public static void writeText(Writer out, boolean escapeUnicode, boolean escapeIsocode, char[] buff, String text, char[] textBuff) throws IOException Write String text. | |
| writeTextChar | back to summary |
|---|---|
| private static int writeTextChar(Writer out, boolean escapeUnicode, boolean escapeIsocode, char ch, int buffIndex, char[] buff, int buffLength) throws IOException | |
| writeTextForXML | back to summary |
|---|---|
| public static void writeTextForXML(Writer out, String text, char[] outbuf) throws IOException | |
| writeUnescapedTextForXML | back to summary |
|---|---|
| public static void writeUnescapedTextForXML(Writer out, String text) throws IOException | |
| writeURIDoubleHex | back to summary |
|---|---|
| private static void writeURIDoubleHex(Writer out, int i) throws IOException | |
| writeURL | back to summary |
|---|---|
| public static void writeURL(Writer out, String text, char[] textBuff, String queryEncoding) throws IOException, UnsupportedEncodingException Writes a string into URL-encoded format out to a Writer. All characters before the start of the query string will be encoded using UTF-8. Characters after the start of the query string will be encoded using a client-defined encoding. You'll need to use the encoding that the server will expect. (HTML forms will generate query strings using the character encoding that the HTML itself was generated in.) All characters will be encoded as needed for URLs, with the exception of the percent symbol ("%"). Because this is the character itself used for escaping, attempting to escape this character would cause this code to double-escape some strings. It also may be necessary to pre-escape some characters. In particular, a question mark ("?") is considered the start of the query string.
NOTE: This is method is duplicated below. The difference being the acceptance of a char[] for the text to write. Any changes made here, should be made below. | |
| writeURL | back to summary |
|---|---|
| public static void writeURL(Writer out, char[] textBuff, int start, int len, String queryEncoding) throws IOException, UnsupportedEncodingException Writes a string into URL-encoded format out to a Writer. All characters before the start of the query string will be encoded using UTF-8. Characters after the start of the query string will be encoded using a client-defined encoding. You'll need to use the encoding that the server will expect. (HTML forms will generate query strings using the character encoding that the HTML itself was generated in.) All characters will be encoded as needed for URLs, with the exception of the percent symbol ("%"). Because this is the character itself used for escaping, attempting to escape this character would cause this code to double-escape some strings. It also may be necessary to pre-escape some characters. In particular, a question mark ("?") is considered the start of the query string.
NOTE: This is method is duplicated above. The difference being the acceptance of a String for the text to write. Any changes made here, should be made above. | |
Private implementation of ByteArrayOutputStream.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | Returns: bufObtain access to the underlying byte array to prevent unecessary temp object creation. |
| MyByteArrayOutputStream | back to summary |
|---|---|
| public MyByteArrayOutputStream(int initialCapacity) | |
| getBuf | back to summary |
|---|---|
| public byte[] getBuf() Obtain access to the underlying byte array to prevent unecessary temp object creation.
| |