com.h3c.util.net

## Interface Writable

-     public interface Writable

  Abstraction of an entity capable of writing itself out onto a specified output stream using a determinate number of bytes.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `writableLength()` Get the number of bytes that will be required to write itself out.
    `void` | `write(OutputStream os)` Writes itself out onto the specified output stream.

- - ### Method Detail

    - #### writableLength

          int writableLength()

      Get the number of bytes that will be required to write itself out.
      Returns:
        number of bytes that will be written by write(OutputStream) method invocation

    - #### write

          void write(OutputStream os)
                     throws IOException

      Writes itself out onto the specified output stream. The number of bytes written must correspond to the result of writableLength() invocation.
      Parameters:
        `os` - output stream which the object is to write itself
      Throws:
        `IOException` - if any IO error occurs while writing to output

Copyright © 2014. All Rights Reserved.