## org.jgroups.util
Class ExposedDataOutputStream

    java.lang.Object
      java.io.OutputStream
          java.io.FilterOutputStream
              java.io.DataOutputStream
                  org.jgroups.util.ExposedDataOutputStream

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

    public class ExposedDataOutputStream

extends java.io.DataOutputStream

Author:
  Bela Ban

Field Summary

Fields inherited from class java.io.DataOutputStream
`written`

Fields inherited from class java.io.FilterOutputStream
`out`

Constructor Summary
`ExposedDataOutputStream(java.io.OutputStream out)` Creates a new data output stream to write data to the specified underlying output stream.

Method Summary
`java.io.OutputStream` `getOutputStream()`
`void` `reset()`
`void` `write(byte[] b, int off, int len)` Writes `len` bytes from the specified byte array starting at offset `off` to the underlying output stream.
`void` `write(int b)`

Methods inherited from class java.io.DataOutputStream
`flush, size, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF`

Methods inherited from class java.io.FilterOutputStream
`close, write`

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

Methods inherited from interface java.io.DataOutput
`write`

Constructor Detail

### ExposedDataOutputStream

    public ExposedDataOutputStream(java.io.OutputStream out)

  Creates a new data output stream to write data to the specified underlying output stream. The counter `written` is set to zero.

  Parameters:
    `out` - the underlying output stream, to be saved for later use.
  See Also:
    `FilterOutputStream.out`

Method Detail

### reset

    public void reset()

### getOutputStream

    public java.io.OutputStream getOutputStream()

### write

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

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

### write

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

  Writes `len` bytes from the specified byte array starting at offset `off` to the underlying output stream. If no exception is thrown, the counter `written` is incremented by `len`.

  Specified by:
    `write` in interface `java.io.DataOutput`
  Overrides:
    `write` in class `java.io.DataOutputStream`
  Parameters:
    `b` - the data.
    `off` - the start offset in the data.
    `len` - the number of bytes to write.
  Throws:
    `java.io.IOException` - if an I/O error occurs.
  See Also:
    `FilterOutputStream.out`

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.