Class 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.OutputStream
    An 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
      void close()
      void complete()
      Completes the stream, writing out base64 padding characters if needed.
      void flush()
      void write​(byte[] b, int off, int len)
      void write​(int b)
      • Methods inherited from class java.io.OutputStream

        nullOutputStream, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(int b)
                   throws java.io.IOException
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.OutputStream
        Throws:
        java.io.IOException
      • complete

        public void complete()
                      throws java.io.IOException
        Completes 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:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.OutputStream
        Throws:
        java.io.IOException