예제 #1
0
 private int writeShort(java.io.OutputStream os, int i)
 {
     //throws java.io.IOException {
     os.write(i & 0xFF);
     os.write((i >> 8) & 0xFF);
     return i;
 }
예제 #2
0
 private long writeLong(java.io.OutputStream os, long i)
 {
     //throws java.io.IOException {
     // Write out the long value as an unsigned int
     os.write((int) (i & 0xFF));
     os.write((int) (i >> 8) & 0xFF);
     os.write((int) (i >> 16) & 0xFF);
     os.write((int) (i >> 24) & 0xFF);
     return i;
 }
예제 #3
0
 private static void flushStartTag(String tagName, java.io.BufferedWriter outJ)
 {
     //throws IOException {
     flushIndent (++indent, outJ);
     outJ.write ("<"); //$NON-NLS-1$
     outJ.write (tagName);
     outJ.write (">"); //$NON-NLS-1$
     outJ.newLine ();
 }
예제 #4
0
        private static void flushPairs(String[] attrKeys, String[] attrValues,
		                                 java.io.BufferedWriter outJ)
        {
            // throws IOException {
            for (int i = 0; i < attrKeys.Length; i++) {
                outJ.write (" "); //$NON-NLS-1$
                outJ.write (attrKeys [i]);
                outJ.write ("=\""); //$NON-NLS-1$
                outJ.write (htmlEncode (attrValues [i]));
                outJ.write ("\""); //$NON-NLS-1$
            }
        }
예제 #5
0
 private static void flushIndent(int ind, java.io.BufferedWriter outJ)
 {
     //throws IOException {
     for (int i = 0; i < ind; i++) {
         outJ.write ("  "); //$NON-NLS-1$
     }
 }
예제 #6
0
        private static void flushEmptyElement(String tagName, String[] attrKeys,
		                                        String[] attrValues, java.io.BufferedWriter outJ)
        {
            // throws IOException {
            flushIndent (++indent, outJ);
            outJ.write ("<"); //$NON-NLS-1$
            outJ.write (tagName);
            flushPairs (attrKeys, attrValues, outJ);
            outJ.write (" />"); //$NON-NLS-1$
            outJ.newLine ();
            indent--;
        }