Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.emory.mathcs.util.io
Class BufferedDataOutputStream

    java.lang.Object
      java.io.OutputStream
          edu.emory.mathcs.util.io.BufferedDataOutputStream

All Implemented Interfaces:
  java.io.DataOutput

public class BufferedDataOutputStream
extends java.io.OutputStream
implements java.io.DataOutput

Buffered data output stream that supports serialization of arrays of primitive types.

Version:
  1.0
Author:
  Tomasz Wrzosek

Constructor Summary
`BufferedDataOutputStream(java.io.OutputStream out)` Deprecated. Constructs buffered data output stream.
`BufferedDataOutputStream(java.io.OutputStream out, int buffer_size)` Deprecated. Constructs buffered data output stream.

Method Summary
`void` | `close()` Deprecated. Closes the underlying output stream.
`void` | `flush()` Deprecated. Flushes not written (possibly buffered) data into the stream.
`protected void` | `flushBuffer()` Deprecated. Empties the buffer into the underlying stream.
`protected int` | `getUTFStringLength(java.lang.String str)` Deprecated.
`void` | `write(byte[] b)` Deprecated. Writes an array of bytes into the output stream.
`void` | `write(byte[] b, int off, int lng)` Deprecated. Writes lng of bytes into the output stream.
`void` | `write(int b)` Deprecated. Writes a byte into the output stream.
`void` | `writeBoolean(boolean b)` Deprecated. Writes a boolean into the output stream.
`void` | `writeBooleans(boolean[] booleans, int off, int lng)` Deprecated. Writes exactly lng of booleans to the stream starting from booleans[off].
`void` | `writeByte(int b)` Deprecated. Writes a byte into the output stream.
`void` | `writeBytes(byte[] bytes, int off, int lng)` Deprecated. Writes exactly lng of bytes to the stream starting from bytes[off].
`void` | `writeBytes(java.lang.String str)` Deprecated. Writes a string as an array of bytes into the output stream.
`void` | `writeChar(int c)` Deprecated. Writes a char into the output stream.
`void` | `writeChars(char[] chars, int off, int lng)` Deprecated. Writes exactly lng of chars to the stream starting from chars[off].
`void` | `writeChars(java.lang.String str)` Deprecated. Writes a string as an array of chars into the output stream.
`void` | `writeDouble(double d)` Deprecated. Writes a double into the output stream.
`void` | `writeDoubles(double[] doubles, int off, int lng)` Deprecated. Writes exactly lng of doubles to the stream starting from doubles[off].
`void` | `writeFloat(float f)` Deprecated. Writes a float into the output stream.
`void` | `writeFloats(float[] floats, int off, int lng)` Deprecated. Writes exactly lng of floats to the stream starting from floats[off].
`void` | `writeInt(int i)` Deprecated. Writes an integer into the output stream.
`void` | `writeInts(int[] ints, int off, int lng)` Deprecated. Writes exactly lng of integers to the stream starting from ints[off].
`void` | `writeLong(long l)` Deprecated. Writes a long into the output stream.
`void` | `writeLongs(long[] longs, int off, int lng)` Deprecated. Writes exactly lng of longs to the stream starting from longs[off].
`void` | `writeShort(int s)` Deprecated. Writes a short into the output stream.
`void` | `writeShorts(short[] shorts, int off, int lng)` Deprecated. Writes exactly lng of shorts to the stream starting from shorts[off].
`void` | `writeUTF(java.lang.String str)` Deprecated. Writes a string in the UTF into the output stream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BufferedDataOutputStream

    public BufferedDataOutputStream(java.io.OutputStream out)

  Deprecated.
  Constructs buffered data output stream.

Parameters:
  `out` - the underlying output stream.

### BufferedDataOutputStream

    public BufferedDataOutputStream(java.io.OutputStream out,
                                    int buffer_size)

  Deprecated.
  Constructs buffered data output stream.

Parameters:
  `out` - the underlying output stream.
  `buffer_size` - the size of the data buffer

Method Detail

### write

    public void write(byte[] b)
               throws java.io.IOException

  Deprecated.
  Writes an array of bytes into the output stream.

  Specified by:
    `write` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### write

    public void write(byte[] b,
                      int off,
                      int lng)
               throws java.io.IOException

  Deprecated.
  Writes lng of bytes into the output stream. It starts writing the bytes from b[off].

  Specified by:
    `write` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### write

    public void write(int b)
               throws java.io.IOException

  Deprecated.
  Writes a byte into the output stream. The 24 high-order bits are ignored.

  Specified by:
    `write` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Deprecated.
  Closes the underlying output stream.

  Throws:
    `java.io.IOException`

### flush

    public void flush()
               throws java.io.IOException

  Deprecated.
  Flushes not written (possibly buffered) data into the stream.

  Throws:
    `java.io.IOException`

### flushBuffer

    protected void flushBuffer()
                        throws java.io.IOException

  Deprecated.
  Empties the buffer into the underlying stream. Does not flush the stream.

  Throws:
    `java.io.IOException`

### writeByte

    public void writeByte(int b)
                   throws java.io.IOException

  Deprecated.
  Writes a byte into the output stream. The 24 high-order bits are ignored.

  Specified by:
    `writeByte` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeBoolean

    public void writeBoolean(boolean b)
                      throws java.io.IOException

  Deprecated.
  Writes a boolean into the output stream.

  Specified by:
    `writeBoolean` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeShort

    public void writeShort(int s)
                    throws java.io.IOException

  Deprecated.
  Writes a short into the output stream.

  Specified by:
    `writeShort` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeChar

    public void writeChar(int c)
                   throws java.io.IOException

  Deprecated.
  Writes a char into the output stream.

  Specified by:
    `writeChar` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeInt

    public void writeInt(int i)
                  throws java.io.IOException

  Deprecated.
  Writes an integer into the output stream.

  Specified by:
    `writeInt` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeLong

    public void writeLong(long l)
                   throws java.io.IOException

  Deprecated.
  Writes a long into the output stream.

  Specified by:
    `writeLong` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeFloat

    public void writeFloat(float f)
                    throws java.io.IOException

  Deprecated.
  Writes a float into the output stream.

  Specified by:
    `writeFloat` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeDouble

    public void writeDouble(double d)
                     throws java.io.IOException

  Deprecated.
  Writes a double into the output stream.

  Specified by:
    `writeDouble` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeBytes

    public void writeBytes(byte[] bytes,
                           int off,
                           int lng)
                    throws java.io.IOException

  Deprecated.
  Writes exactly lng of bytes to the stream starting from bytes[off].

  If bytes is null NullPointerException is thrown.

  If off is negative, or lng is negative, or off+lng is grater than bytes length then IndexOutOfBoundsException is thrown.

  If lng is 0 or bytes length is 0 then no bytes are written.

  Parameters:
    `bytes` - the source array
    `off` - starting index in array
    `lng` - number of items to write
  Throws:
    `java.io.IOException` - when I/O error occurs.

### writeBooleans

    public void writeBooleans(boolean[] booleans,
                              int off,
                              int lng)
                       throws java.io.IOException

  Deprecated.
  Writes exactly lng of booleans to the stream starting from booleans[off].

  If booleans is null NullPointerException is thrown.

  If off is negative, or lng is negative, or off+lng is grater than booleans length then IndexOutOfBoundsException is thrown.

  If lng is 0 or booleans length is 0 then no booleans are written.

  Parameters:
    `booleans` - the source array
    `off` - starting index in array
    `lng` - number of items to write
  Throws:
    `java.io.IOException` - when I/O error occurs.

### writeChars

    public void writeChars(char[] chars,
                           int off,
                           int lng)
                    throws java.io.IOException

  Deprecated.
  Writes exactly lng of chars to the stream starting from chars[off].

  If chars is null NullPointerException is thrown.

  If off is negative, or lng is negative, or off+lng is grater than chars length then IndexOutOfBoundsException is thrown.

  If lng is 0 or chars length is 0 then no chars are written.

  Parameters:
    `chars` - the source array
    `off` - starting index in array
    `lng` - number of items to write
  Throws:
    `java.io.IOException` - when I/O error occurs.

### writeShorts

    public void writeShorts(short[] shorts,
                            int off,
                            int lng)
                     throws java.io.IOException

  Deprecated.
  Writes exactly lng of shorts to the stream starting from shorts[off].

  If shorts is null NullPointerException is thrown.

  If off is negative, or lng is negative, or off+lng is grater than shorts length then IndexOutOfBoundsException is thrown.

  If lng is 0 or shorts length is 0 then no shorts are written.

  Parameters:
    `shorts` - the source array
    `off` - starting index in array
    `lng` - number of items to write
  Throws:
    `java.io.IOException` - when I/O error occurs.

### writeInts

    public void writeInts(int[] ints,
                          int off,
                          int lng)
                   throws java.io.IOException

  Deprecated.
  Writes exactly lng of integers to the stream starting from ints[off].

  If ints is null NullPointerException is thrown.

  If off is negative, or lng is negative, or off+lng is grater than ints length then IndexOutOfBoundsException is thrown.

  If lng is 0 or ints length is 0 then no integers are written.

  Parameters:
    `ints` - the source array
    `off` - starting index in array
    `lng` - number of items to write
  Throws:
    `java.io.IOException` - when I/O error occurs.

### writeFloats

    public void writeFloats(float[] floats,
                            int off,
                            int lng)
                     throws java.io.IOException

  Deprecated.
  Writes exactly lng of floats to the stream starting from floats[off].

  If floats is null NullPointerException is thrown.

  If off is negative, or lng is negative, or off+lng is grater than floats length then IndexOutOfBoundsException is thrown.

  If lng is 0 or floats length is 0 then no floats are written.

  Parameters:
    `floats` - the source array
    `off` - starting index in array
    `lng` - number of items to write
  Throws:
    `java.io.IOException` - when I/O error occurs.

### writeLongs

    public void writeLongs(long[] longs,
                           int off,
                           int lng)
                    throws java.io.IOException

  Deprecated.
  Writes exactly lng of longs to the stream starting from longs[off].

  If longs is null NullPointerException is thrown.

  If off is negative, or lng is negative, or off+lng is grater than longs length then IndexOutOfBoundsException is thrown.

  If lng is 0 or longs length is 0 then no longs are written.

  Parameters:
    `longs` - the source array
    `off` - starting index in array
    `lng` - number of items to write
  Throws:
    `java.io.IOException` - when I/O error occurs.

### writeDoubles

    public void writeDoubles(double[] doubles,
                             int off,
                             int lng)
                      throws java.io.IOException

  Deprecated.
  Writes exactly lng of doubles to the stream starting from doubles[off].

  If doubles is null NullPointerException is thrown.

  If off is negative, or lng is negative, or off+lng is grater than doubles length then IndexOutOfBoundsException is thrown.

  If lng is 0 or doubles length is 0 then no doubles are written.

  Parameters:
    `doubles` - the source array
    `off` - starting index in array
    `lng` - number of items to write
  Throws:
    `java.io.IOException` - when I/O error occurs.

### writeChars

    public void writeChars(java.lang.String str)
                    throws java.io.IOException

  Deprecated.
  Writes a string as an array of chars into the output stream.

  Specified by:
    `writeChars` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeBytes

    public void writeBytes(java.lang.String str)
                    throws java.io.IOException

  Deprecated.
  Writes a string as an array of bytes into the output stream. High order bytes of each char are ignored.

  Specified by:
    `writeBytes` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### writeUTF

    public void writeUTF(java.lang.String str)
                  throws java.io.IOException

  Deprecated.
  Writes a string in the UTF into the output stream.

  Specified by:
    `writeUTF` in interface `java.io.DataOutput`
  Throws:
    `java.io.IOException`

### getUTFStringLength

    protected int getUTFStringLength(java.lang.String str)
                              throws java.io.IOException

  Deprecated.
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD