com.io7m.smfj.format.binary

## Interface SMFBDataStreamWriterType

- All Known Implementing Classes:
    SMFBDataStreamWriter

      public interface SMFBDataStreamWriterType

  A stream writer.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `pad(long count, byte value)` Insert `count` octets of padding.
    `default void` | `padTo(long offset, byte value)` Insert padding up to `offset`.
    `long` | `position()`
    `void` | `putBytes(byte[] data)` Write the given bytes to the stream.
    `void` | `putF16(double value)` Write an IEEE754-binary16 value to the stream.
    `void` | `putF32(double value)` Write an IEEE754-binary32 value to the stream.
    `void` | `putF64(double value)` Write an IEEE754-binary64 value to the stream.
    `void` | `putS16(long value)` Write a signed 16-bit value to the stream.
    `void` | `putS32(long value)` Write a signed 32-bit value to the stream.
    `void` | `putS64(long value)` Write a signed 64-bit value to the stream.
    `void` | `putS8(long value)` Write a signed 8-bit value to the stream.
    `void` | `putStringPadded(String text, int maximum)` Write a string to the stream in UTF-8 encoding, writing as many 0-bytes as necessary after the string to bring it up to a size of `maximum` octets.
    `void` | `putU16(long value)` Write an unsigned 16-bit value to the stream.
    `void` | `putU32(long value)` Write an unsigned 32-bit value to the stream.
    `void` | `putU64(long value)` Write an unsigned 64-bit value to the stream.
    `void` | `putU8(long value)` Write an unsigned 8-bit value to the stream.
    `URI` | `uri()`

- - ### Method Detail

    - #### position

          long position()

      Returns:
        The current stream position; the number of octets written (or skipped) so far

    - #### uri

          URI uri()

      Returns:
        The URI referred to by the stream

    - #### putBytes

          void putBytes(byte[] data)
                 throws IOException

      Write the given bytes to the stream.
      Parameters:
        `data` - The bytes
      Throws:
        `IOException` - On I/O errors

    - #### putS8

          void putS8(long value)
              throws IOException

      Write a signed 8-bit value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putU8

          void putU8(long value)
              throws IOException

      Write an unsigned 8-bit value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putStringPadded

          void putStringPadded(String text,
                               int maximum)
                        throws IOException

      Write a string to the stream in UTF-8 encoding, writing as many 0-bytes as necessary after the string to bring it up to a size of `maximum` octets.
      Parameters:
        `text` - The string
        `maximum` - The maximum length
      Throws:
        `IOException` - On I/O errors

    - #### putU16

          void putU16(long value)
               throws IOException

      Write an unsigned 16-bit value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putU32

          void putU32(long value)
               throws IOException

      Write an unsigned 32-bit value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putU64

          void putU64(long value)
               throws IOException

      Write an unsigned 64-bit value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putS16

          void putS16(long value)
               throws IOException

      Write a signed 16-bit value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putS32

          void putS32(long value)
               throws IOException

      Write a signed 32-bit value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putS64

          void putS64(long value)
               throws IOException

      Write a signed 64-bit value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putF16

          void putF16(double value)
               throws IOException

      Write an IEEE754-binary16 value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putF32

          void putF32(double value)
               throws IOException

      Write an IEEE754-binary32 value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### putF64

          void putF64(double value)
               throws IOException

      Write an IEEE754-binary64 value to the stream.
      Parameters:
        `value` - The value
      Throws:
        `IOException` - On I/O errors

    - #### pad

          void pad(long count,
                   byte value)
            throws IOException

      Insert `count` octets of padding.
      Parameters:
        `count` - The octet count
        `value` - The padding value
      Throws:
        `IOException` - On I/O errors

    - #### padTo

          default void padTo(long offset,
                             byte value)
                      throws IOException

      Insert padding up to `offset`. Has no effect if the writer has already passed `offset`.
      Parameters:
        `offset` - The octet count
        `value` - The padding value
      Throws:
        `IOException` - On I/O errors

Copyright © 2017 <code@io7m.com> http://io7m.com