Home » openjdk-7 » java » io » [javadoc | source]
java.io
static class: ObjectOutputStream.BlockDataOutputStream [javadoc | source]
java.lang.Object
   java.io.OutputStream
      java.io.ObjectOutputStream$BlockDataOutputStream

All Implemented Interfaces:
    DataOutput, Flushable, Closeable

Buffered output stream with two modes: in default mode, outputs data in same format as DataOutputStream; in "block data" mode, outputs data bracketed by block data markers (see object serialization specification for details).
Constructor:
 BlockDataOutputStream(OutputStream out) 
    Creates new BlockDataOutputStream on top of given underlying stream. Block data mode is turned off by default.
Method from java.io.ObjectOutputStream$BlockDataOutputStream Summary:
close,   drain,   flush,   getBlockDataMode,   getUTFLength,   setBlockDataMode,   write,   write,   write,   write,   writeBoolean,   writeBooleans,   writeByte,   writeBytes,   writeChar,   writeChars,   writeChars,   writeDouble,   writeDoubles,   writeFloat,   writeFloats,   writeInt,   writeInts,   writeLong,   writeLongUTF,   writeLongUTF,   writeLongs,   writeShort,   writeShorts,   writeUTF,   writeUTF
Methods from java.io.OutputStream:
close,   flush,   write,   write,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.io.ObjectOutputStream$BlockDataOutputStream Detail:
 public  void close() throws IOException 
  void drain() throws IOException 
    Writes all buffered data from this stream to the underlying stream, but does not flush underlying stream.
 public  void flush() throws IOException 
 boolean getBlockDataMode() 
    Returns true if the stream is currently in block data mode, false otherwise.
 long getUTFLength(String s) 
    Returns the length in bytes of the UTF encoding of the given string.
 boolean setBlockDataMode(boolean mode) throws IOException 
    Sets block data mode to the given mode (true == on, false == off) and returns the previous mode value. If the new mode is the same as the old mode, no action is taken. If the new mode differs from the old mode, any buffered data is flushed before switching to the new mode.
 public  void write(int b) throws IOException 
 public  void write(byte[] b) throws IOException 
 public  void write(byte[] b,
    int off,
    int len) throws IOException 
  void write(byte[] b,
    int off,
    int len,
    boolean copy) throws IOException 
    Writes specified span of byte values from given array. If copy is true, copies the values to an intermediate buffer before writing them to underlying stream (to avoid exposing a reference to the original byte array).
 public  void writeBoolean(boolean v) throws IOException 
  void writeBooleans(boolean[] v,
    int off,
    int len) throws IOException 
 public  void writeByte(int v) throws IOException 
 public  void writeBytes(String s) throws IOException 
 public  void writeChar(int v) throws IOException 
 public  void writeChars(String s) throws IOException 
  void writeChars(char[] v,
    int off,
    int len) throws IOException 
 public  void writeDouble(double v) throws IOException 
  void writeDoubles(double[] v,
    int off,
    int len) throws IOException 
 public  void writeFloat(float v) throws IOException 
  void writeFloats(float[] v,
    int off,
    int len) throws IOException 
 public  void writeInt(int v) throws IOException 
  void writeInts(int[] v,
    int off,
    int len) throws IOException 
 public  void writeLong(long v) throws IOException 
  void writeLongUTF(String s) throws IOException 
    Writes given string in "long" UTF format. "Long" UTF format is identical to standard UTF, except that it uses an 8 byte header (instead of the standard 2 bytes) to convey the UTF encoding length.
  void writeLongUTF(String s,
    long utflen) throws IOException 
    Writes given string in "long" UTF format, where the UTF encoding length of the string is already known.
  void writeLongs(long[] v,
    int off,
    int len) throws IOException 
 public  void writeShort(int v) throws IOException 
  void writeShorts(short[] v,
    int off,
    int len) throws IOException 
 public  void writeUTF(String s) throws IOException 
  void writeUTF(String s,
    long utflen) throws IOException 
    Writes the given string in UTF format. This method is used in situations where the UTF encoding length of the string is already known; specifying it explicitly avoids a prescan of the string to determine its UTF length.