Class Base64EncodeStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- de.erichseifert.vectorgraphics2d.util.Base64EncodeStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class Base64EncodeStream extends java.io.FilterOutputStream
-
-
Constructor Summary
Constructors Constructor Description Base64EncodeStream(java.io.OutputStream out)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private int
encodeChunk(long uint32, int padByteCount)
private static long
toUInt32(byte[] bytes, int size)
private static long
toUnsignedInt(long x)
void
write(int b)
private void
writeChunk()
-
-
-
Field Detail
-
BASE
private static final int BASE
- See Also:
- Constant Field Values
-
POW_64
private static final int[] POW_64
-
CHAR_MAP
private static final char[] CHAR_MAP
-
closed
private boolean closed
-
data
private final byte[] data
-
dataSize
private int dataSize
-
encoded
private final byte[] encoded
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException
- Overrides:
write
in classjava.io.FilterOutputStream
- Throws:
java.io.IOException
-
writeChunk
private void writeChunk() throws java.io.IOException
- Throws:
java.io.IOException
-
toUInt32
private static long toUInt32(byte[] bytes, int size)
-
toUnsignedInt
private static long toUnsignedInt(long x)
-
encodeChunk
private int encodeChunk(long uint32, int padByteCount)
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.FilterOutputStream
- Throws:
java.io.IOException
-
-