Package io.undertow.util
Class FlexBase64.EncoderOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- io.undertow.util.FlexBase64.EncoderOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Enclosing class:
- FlexBase64
public static class FlexBase64.EncoderOutputStream extends java.io.OutputStreamAn output stream which base64 encodes all passed data and writes it to the wrapped target output stream.Closing this stream will result in the correct padding sequence being written. However, as required by the OutputStream contract, the wrapped stream will also be closed. If this is not desired, the
complete()method should be used.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcomplete()Completes the stream, writing out base64 padding characters if needed.voidflush()voidwrite(byte[] b, int off, int len)voidwrite(int b)
-
-
-
Method Detail
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream- Throws:
java.io.IOException
-
complete
public void complete() throws java.io.IOExceptionCompletes the stream, writing out base64 padding characters if needed.- Throws:
java.io.IOException- if the underlying stream throws one
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.IOException
-
-