==== //depot/maindev/src/java/com/docent/io/Base64.java#1 (text) - //depot/universe/src/com/docent/io/Base64.java#2 (text) ==== content
40c40
<     /** This byte is appended to encoded data, as needed to
---
>     /** This character is appended to encoded data, as needed to
43c43
<     public static final byte PAD = (byte)'=';
---
>     public static final char PAD = '=';
45,53c45,52
<     protected static final String hexDigit = "0123456789abcdef";
< 
<     /** @return the hexadecimal representation of b, 2 characters zero-filled. */
<     public static String toHexString(byte b)
<     {
<         char[] s = {hexDigit.charAt((((int)b) >> 4) & 0xF),
<                     hexDigit.charAt((((int)b)     ) & 0xF)};
<         return new String(s);
<     }
---
>     /** Characters that are significant in encoded data.
>      * <code>ALPHABET.charAt(0)</code> encodes 0, and so on up to <code>ALPHABET.charAt(63)</code> which encodes 63.
>      * <code>ALPHABET.charAt(64)</code> is <code>PAD</code>.
>      */
>     public static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>                                         + "abcdefghijklmnopqrstuvwxyz"
>                                         + "0123456789+/"
>                                         + PAD;
==== //depot/maindev/src/java/com/docent/io/Base64DecodeInputStream.java#2 (text) - //depot/universe/src/com/docent/io/Base64DecodeInputStream.java#2 (text) ==== content
3a4
> import java.io.OutputStream;
15c16
<         setByteFilter(new Base64DecodeOutputStream(getByteFilter()));
---
>         setByteFilter(newDecoder(getByteFilter()));
21c22,29
<         setByteFilter(new Base64DecodeOutputStream(getByteFilter()));
---
>         setByteFilter(newDecoder(getByteFilter()));
>     }
> 
>     protected static OutputStream newDecoder(OutputStream out)
>     {
>         Base64DecodeOutputStream result = new Base64DecodeOutputStream(out);
>         result.setFlushCausesReset(true);
>         return result;
22a31
> 
==== //depot/maindev/src/java/com/docent/io/Base64DecodeOutputStream.java#3 (ktext) - //depot/universe/src/com/docent/io/Base64DecodeOutputStream.java#2 (text) ==== content
10c10
<  * Base64 encoding is defined by RFC 2045 (MIME) section 6.8.
---
>  * <p>Base64 encoding is defined by RFC 2045 (MIME) section 6.8.
66a67,99
>     public void flush()
>         throws IOException
>     {
>         if (flushCausesReset) n = 0;
>         super.flush();
>     }
> 
>     /** Subsequently, a call to <code>flush()</code> will reset this object's state
>      * if and only if the given parameter is <code>true</code>.
>      * The default setting (if this method is not called) is <code>false</code>.
>      *
>      * <p>For example, <code>write("BA"); flush(); write("BA")</code> will ordinarily
>      * produce the same sequence of decoded bytes as <code>write("BABA")</code>;
>      * that is {4, 0, 64}.
>      * But {4, 4} will be produced if <code>setFlushCausesReset(true)</code>
>      * is called before <code>flush()</code>.  In the latter case,
>      * the second "BA" will be decoded as if it appeared at the beginning of a stream.
>      *
>      * @param b whether the decoder will be reset by a subsequent call to flush().
>      * <code>false</code> (the default) is appropriate if flush() is called
>      * merely for performance optimization, and should not affect decoding.
>      * <code>true</code> is appropriate if a call to flush() indicates
>      * a significant boundary in the data stream, such that previous
>      * bytes should not be combined with subsequent bytes for decoding.
>      */
>     public void setFlushCausesReset(boolean b)
>     {
>         flushCausesReset = b;
>     }
> 
>     /** whether flush() resets the decoder */
>     protected boolean flushCausesReset = false;
> 
122c155
<                     System.err.print(" " + Base64.toHexString(b[j]));
---
>                     System.err.print(" " + Hexadecimal.format(b[j]));
==== //depot/maindev/src/java/com/docent/io/Base64EncodeInputStream.java#2 (text) - //depot/universe/src/com/docent/io/Base64EncodeInputStream.java#2 (text) ==== identical
==== //depot/maindev/src/java/com/docent/io/Base64EncodeOutputStream.java#3 (text) - //depot/universe/src/com/docent/io/Base64EncodeOutputStream.java#2 (text) ==== content
13c13
<  * Base64 encoding is defined by RFC 2045 (MIME) section 6.8.
---
>  * <p>Base64 encoding is defined by RFC 2045 (MIME) section 6.8.
54a55,56
>     private byte[] encoded = new byte[4];
> 
58,62c60,63
<         byte[] encoded = {map[0x3F & (buf >> 18)] // sextet 1 (octet 1)
<                          ,map[0x3F & (buf >> 12)] // sextet 2 (octet 1 and 2)
<                          ,map[0x3F & (buf >>  6)] // sextet 3 (octet 2 and 3)
<                          ,map[0x3F & (buf      )] // sextet 4 (octet 3)
<                          };
---
>         encoded[0] = map[0x3F & (buf >> 18)]; // sextet 1 (octet 1)
>         encoded[1] = map[0x3F & (buf >> 12)]; // sextet 2 (octet 1 and 2)
>         encoded[2] = map[0x3F & (buf >>  6)]; // sextet 3 (octet 2 and 3)
>         encoded[3] = map[0x3F & (buf      )]; // sextet 4 (octet 3)
72,76c73,76
<         byte[] encoded = {   map[0x3F & (buf >> 18)]              // sextet 1 (octet 1)
<          ,                   map[0x3F & (buf >> 12)]              // sextet 2 (octet 1 and 2)
<          ,(buf_length > 1) ? map[0x3F & (buf >>  6)] : Base64.PAD // sextet 3 (octet 2 and 3)
<          ,(buf_length > 2) ? map[0x3F & (buf      )] : Base64.PAD // sextet 4 (octet 3)
<                          };
---
>         encoded[0] =                    map[0x3F & (buf >> 18)];       // sextet 1 (octet 1)
>         encoded[1] =                    map[0x3F & (buf >> 12)];       // sextet 2 (octet 1 and 2)
>         encoded[2] = (buf_length > 1) ? map[0x3F & (buf >>  6)] : PAD; // sextet 3 (octet 2 and 3)
>         encoded[3] = (buf_length > 2) ? map[0x3F & (buf      )] : PAD; // sextet 4 (octet 3)
84a85,89
>     /** This byte is appended to encoded data, as needed to
>      * make the encoding an integral multiple of four bytes long.
>      */
>     protected static final byte PAD = (byte)Base64.PAD;
> 
86,89c91
<     protected static final byte[] map =
<         toLatin1("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
<                 +"abcdefghijklmnopqrstuvwxyz"
<                 +"0123456789+/");
---
>     protected static final byte[] map = toLatin1(Base64.ALPHABET.substring(0,64));
==== //depot/maindev/src/java/com/docent/io/FilteredByteInputStream.java#2 (text) - //depot/universe/src/com/docent/io/FilteredByteInputStream.java#2 (text) ==== identical
==== //depot/maindev/src/java/com/docent/io/FilteredCharInputStream.java#2 (text) - //depot/universe/src/com/docent/io/FilteredCharInputStream.java#2 (text) ==== identical
==== < none > - //depot/universe/src/com/docent/io/FormEncodedOutput.java#1 ====
==== < none > - //depot/universe/src/com/docent/io/Hexadecimal.java#2 ====
==== //depot/maindev/src/java/com/docent/io/InputFilterInputStream.java#1 (text) - //depot/universe/src/com/docent/io/InputFilterInputStream.java#2 (text) ==== identical
==== //depot/maindev/src/java/com/docent/io/ReaderFilterInputStream.java#3 - <none> ===
==== //depot/maindev/src/java/com/docent/io/SteerableOutputStream.java#1 (text) - //depot/universe/src/com/docent/io/SteerableOutputStream.java#2 (text) ==== identical
==== //depot/maindev/src/java/com/docent/io/StringFilterInputStream.java#1 (text) - //depot/universe/src/com/docent/io/StringFilterInputStream.java#2 (text) ==== identical
==== //depot/maindev/src/java/com/docent/io/SynchronizedInputStream.java#1 - <none> ===
==== < none > - //depot/universe/src/com/docent/io/URLEncodedOutputStream.java#2 ====
==== < none > - //depot/universe/src/com/docent/io/tests/TestBase64.java#2 ====
==== < none > - //depot/universe/src/com/docent/io/tests/TestBase64InputStream.java#2 ====