com.jdon.util
类 Base64.OutputStream

java.lang.Object
  继承者 java.io.OutputStream
      继承者 java.io.FilterOutputStream
          继承者 com.jdon.util.Base64.OutputStream
所有已实现的接口:
Closeable, Flushable
包容类:
Base64

public static class Base64.OutputStream
extends FilterOutputStream

A Base64.OutputStream will write data to another java.io.OutputStream, given in the constructor, and encode/decode to/from Base64 notation on the fly.

从以下版本开始:
1.3
另请参见:
Base64

字段摘要
 
从类 java.io.FilterOutputStream 继承的字段
out
 
构造方法摘要
Base64.OutputStream(OutputStream out)
          Constructs a Base64.OutputStream in ENCODE mode.
Base64.OutputStream(OutputStream out, int options)
          Constructs a Base64.OutputStream in either ENCODE or DECODE mode.
 
方法摘要
 void close()
          Flushes and closes (I think, in the superclass) the stream.
 void flush()
          Flushes the stream (and the enclosing streams).
 void flushBase64()
          Method added by PHIL.
 void resumeEncoding()
          Resumes encoding of the stream.
 void suspendEncoding()
          Suspends encoding of the stream.
 void write(byte[] theBytes, int off, int len)
          Calls write(int) repeatedly until len bytes are written.
 void write(int theByte)
          Writes the byte to the output stream after converting to/from Base64 notation.
 
从类 java.io.FilterOutputStream 继承的方法
write
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Base64.OutputStream

public Base64.OutputStream(OutputStream out)
Constructs a Base64.OutputStream in ENCODE mode.

参数:
out - the java.io.OutputStream to which data will be written.
从以下版本开始:
1.3

Base64.OutputStream

public Base64.OutputStream(OutputStream out,
                           int options)
Constructs a Base64.OutputStream in either ENCODE or DECODE mode.

Valid options:

   ENCODE or DECODE: Encode or Decode as data is read.
   DO_BREAK_LINES: don't break lines at 76 characters
     (only meaningful when encoding)
 

Example: new Base64.OutputStream( out, Base64.ENCODE )

参数:
out - the java.io.OutputStream to which data will be written.
options - Specified options.
从以下版本开始:
1.3
另请参见:
Base64.ENCODE, Base64.DECODE, Base64.DO_BREAK_LINES
方法详细信息

write

public void write(int theByte)
           throws IOException
Writes the byte to the output stream after converting to/from Base64 notation. When encoding, bytes are buffered three at a time before the output stream actually gets a write() call. When decoding, bytes are buffered four at a time.

覆盖:
FilterOutputStream 中的 write
参数:
theByte - the byte to write
抛出:
IOException
从以下版本开始:
1.3

write

public void write(byte[] theBytes,
                  int off,
                  int len)
           throws IOException
Calls write(int) repeatedly until len bytes are written.

覆盖:
FilterOutputStream 中的 write
参数:
theBytes - array from which to read bytes
off - offset for array
len - max number of bytes to read into array
抛出:
IOException
从以下版本开始:
1.3

flushBase64

public void flushBase64()
                 throws IOException
Method added by PHIL. [Thanks, PHIL. -Rob] This pads the buffer without closing the stream.

抛出:
IOException - if there's an error.

flush

public void flush()
           throws IOException
Flushes the stream (and the enclosing streams).

指定者:
接口 Flushable 中的 flush
覆盖:
FilterOutputStream 中的 flush
抛出:
IOException
从以下版本开始:
2.3

close

public void close()
           throws IOException
Flushes and closes (I think, in the superclass) the stream.

指定者:
接口 Closeable 中的 close
覆盖:
FilterOutputStream 中的 close
抛出:
IOException
从以下版本开始:
1.3

suspendEncoding

public void suspendEncoding()
                     throws IOException
Suspends encoding of the stream. May be helpful if you need to embed a piece of base64-encoded data in a stream.

抛出:
IOException - if there's an error flushing
从以下版本开始:
1.5.1

resumeEncoding

public void resumeEncoding()
Resumes encoding of the stream. May be helpful if you need to embed a piece of base64-encoded data in a stream.

从以下版本开始:
1.5.1


Copyright © 2013. All Rights Reserved.