Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.io.pof
Class PofOutputStream

    java.lang.Object
      java.io.OutputStream
          com.tangosol.io.pof.PofOutputStream

All Implemented Interfaces:
  OutputStreaming, java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.io.ObjectOutput

    public class PofOutputStream

extends java.io.OutputStream
implements OutputStreaming, java.io.DataOutput, java.io.ObjectOutput

An ObjectOutput implementation suitable for writing Externalizable and ExternalizableLite objects to a POF stream, although without support for schema evolution and other advanced POF features.

Author:
  cp 2006.07.29

Constructor Summary
`PofOutputStream(PofWriter out)` Construct a PofOutputStream that will write its information to an underlying `PofWriter`.

Method Summary
`void` | `close()` Closes this OutputStream and releases any associated system resources.
`void` | `flush()` Flushes this OutputStream and forces any buffered output bytes to be written.
`PofWriter` | `getPofWriter()` Obtain the underlying PofWriter.
`int` | `nextIndex()` Determine the next property index to write to.
`void` | `write(byte[] ab)` Writes all the bytes in the array `ab`.
`void` | `write(byte[] ab, int of, int cb)` Writes `cb` bytes starting at offset `of` from the array `ab`.
`void` | `write(int b)` Writes the eight low-order bits of the argument `b`.
`void` | `writeBoolean(boolean f)` Writes the boolean value `f`.
`void` | `writeByte(int b)` Writes the eight low-order bits of the argument `b`.
`void` | `writeBytes(java.lang.String s)` Writes the String `s`, but only the low-order byte from each character of the String is written.
`void` | `writeChar(int ch)` Writes a char value, comprised of the 16 low-order bits of the argument `ch`; the 16 high-order bits of `ch` are ignored.
`void` | `writeChars(java.lang.String s)` Writes the String `s` as a sequence of characters.
`void` | `writeDouble(double dfl)` Writes a double value.
`void` | `writeFloat(float fl)` Writes a float value.
`void` | `writeInt(int n)` Writes an int value.
`void` | `writeLong(long l)` Writes a long value.
`void` | `writeObject(java.lang.Object o)` Writes the Object `o` so that the corresponding `ObjectInput.readObject()` method can reconstitute an Object from the written data.
`void` | `writeShort(int n)` Writes a short value, comprised of the 16 low-order bits of the argument `n`; the 16 high-order bits of `n` are ignored.
`void` | `writeUTF(java.lang.String s)` Writes the String `s` as a sequence of characters, but using UTF-8 encoding for the characters, and including the String length data so that the corresponding `DataInput.readUTF()` method can reconstitute a String from the written data.

Constructor Detail

### PofOutputStream

    public PofOutputStream(PofWriter out)

  Construct a PofOutputStream that will write its information to an underlying `PofWriter`.

  Parameters:
    `out` - the `PofWriter` to write to

Method Detail

### write

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

  Writes the eight low-order bits of the argument `b`. The 24 high-order bits of `b` are ignored.

  Specified by:
    `write` in interface `OutputStreaming`
  Specified by:
    `write` in interface `java.io.DataOutput`
  Specified by:
    `write` in interface `java.io.ObjectOutput`
  Specified by:
    `write` in class `java.io.OutputStream`
  Parameters:
    `b` - the byte to write (passed as an integer)
  Throws:
    `java.io.IOException` - if an I/O error occurs

### write

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

  Writes all the bytes in the array `ab`.

  Specified by:
    `write` in interface `OutputStreaming`
  Specified by:
    `write` in interface `java.io.DataOutput`
  Specified by:
    `write` in interface `java.io.ObjectOutput`
  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `ab` - the byte array to write
  Throws:
    `java.io.IOException` - if an I/O error occurs
    `java.lang.NullPointerException` - if `ab` is `null`

### write

    public void write(byte[] ab,
                      int of,
                      int cb)
               throws java.io.IOException

  Writes `cb` bytes starting at offset `of` from the array `ab`.

  Specified by:
    `write` in interface `OutputStreaming`
  Specified by:
    `write` in interface `java.io.DataOutput`
  Specified by:
    `write` in interface `java.io.ObjectOutput`
  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `ab` - the byte array to write from
    `of` - the offset into `ab` to start writing from
    `cb` - the number of bytes from `ab` to write
  Throws:
    `java.io.IOException` - if an I/O error occurs
    `java.lang.NullPointerException` - if `ab` is `null`
    `java.lang.IndexOutOfBoundsException` - if `of` is negative, or `cb` is negative, or `of+cb` is greater than `ab.length`

### flush

    public void flush()
               throws java.io.IOException

  Flushes this OutputStream and forces any buffered output bytes to be written.

  Specified by:
    `flush` in interface `OutputStreaming`
  Specified by:
    `flush` in interface `java.io.Flushable`
  Specified by:
    `flush` in interface `java.io.ObjectOutput`
  Overrides:
    `flush` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException` - if an I/O error occurs

### close

    public void close()
               throws java.io.IOException

  Closes this OutputStream and releases any associated system resources.

  Specified by:
    `close` in interface `OutputStreaming`
  Specified by:
    `close` in interface `java.io.Closeable`
  Specified by:
    `close` in interface `java.io.ObjectOutput`
  Overrides:
    `close` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeBoolean

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

  Writes the boolean value `f`.

  Specified by:
    `writeBoolean` in interface `java.io.DataOutput`
  Parameters:
    `f` - the boolean to be written
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeByte

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

  Writes the eight low-order bits of the argument `b`. The 24 high-order bits of `b` are ignored.

  Specified by:
    `writeByte` in interface `java.io.DataOutput`
  Parameters:
    `b` - the byte to write (passed as an integer)
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeShort

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

  Writes a short value, comprised of the 16 low-order bits of the argument `n`; the 16 high-order bits of `n` are ignored.

  Specified by:
    `writeShort` in interface `java.io.DataOutput`
  Parameters:
    `n` - the short to write (passed as an integer)
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeChar

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

  Writes a char value, comprised of the 16 low-order bits of the argument `ch`; the 16 high-order bits of `ch` are ignored.

  Specified by:
    `writeChar` in interface `java.io.DataOutput`
  Parameters:
    `ch` - the char to write (passed as an integer)
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeInt

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

  Writes an int value.

  Specified by:
    `writeInt` in interface `java.io.DataOutput`
  Parameters:
    `n` - the int to write
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeLong

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

  Writes a long value.

  Specified by:
    `writeLong` in interface `java.io.DataOutput`
  Parameters:
    `l` - the long to write
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeFloat

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

  Writes a float value.

  Specified by:
    `writeFloat` in interface `java.io.DataOutput`
  Parameters:
    `fl` - the float to write
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeDouble

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

  Writes a double value.

  Specified by:
    `writeDouble` in interface `java.io.DataOutput`
  Parameters:
    `dfl` - the double to write
  Throws:
    `java.io.IOException` - if an I/O error occurs

### writeBytes

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

  Writes the String `s`, but only the low-order byte from each character of the String is written.

  Specified by:
    `writeBytes` in interface `java.io.DataOutput`
  Parameters:
    `s` - the String to write
  Throws:
    `java.io.IOException` - if an I/O error occurs
    `java.lang.NullPointerException` - if `s` is `null`

### writeChars

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

  Writes the String `s` as a sequence of characters.

  Specified by:
    `writeChars` in interface `java.io.DataOutput`
  Parameters:
    `s` - the String to write
  Throws:
    `java.io.IOException` - if an I/O error occurs
    `java.lang.NullPointerException` - if `s` is `null`

### writeUTF

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

  Writes the String `s` as a sequence of characters, but using UTF-8 encoding for the characters, and including the String length data so that the corresponding `DataInput.readUTF()` method can reconstitute a String from the written data.

  Specified by:
    `writeUTF` in interface `java.io.DataOutput`
  Parameters:
    `s` - the String to write
  Throws:
    `java.io.IOException` - if an I/O error occurs
    `java.lang.NullPointerException` - if `s` is `null`

### writeObject

    public void writeObject(java.lang.Object o)
                     throws java.io.IOException

  Writes the Object `o` so that the corresponding `ObjectInput.readObject()` method can reconstitute an Object from the written data.

  Specified by:
    `writeObject` in interface `java.io.ObjectOutput`
  Parameters:
    `o` - the Object to write
  Throws:
    `java.io.IOException` - if an I/O error occurs

### getPofWriter

    public PofWriter getPofWriter()

  Obtain the underlying PofWriter.

  Returns:
    the PofWriter

### nextIndex

    public int nextIndex()

  Determine the next property index to write to.

  Returns:
    the next property index to write to

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.