lev

## Class LOutChannel

- java.lang.Object
- - lev.LExport
  - - lev.LOutChannel

-     public class LOutChannel
      extends LExport

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LOutChannel(java.io.File f)`
    `LOutChannel(java.lang.String path)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Flushes buffer and closes output stream.
    `void` | `closeLength()` Used in conjunction with markLength(int).
    `void` | `fillPosMarker()` Used in conjunction with setPosMarker(int).
    `void` | `markLength(int size)` A stack-based system where you can declare an amount of bytes to represent the length of some upcoming data.
    `void` | `openOutput(java.lang.String path)`
    `long` | `pos()`
    `void` | `pos(long set)`
    `void` | `setPosMarker(int size)` A queue-based system where you can declare an amount of bytes to represent the position of some upcoming data.
    `void` | `write(byte b)`
    `void` | `write(byte[] array)` Writes a byte array to the file.

    - ### Methods inherited from class lev.LExport

      `write, write, write, write, write, write, write, writeZeros`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LOutChannel

          public LOutChannel(java.lang.String path)
                      throws java.io.FileNotFoundException

      Parameters:
        `path` - Path to open a channel to.
      Throws:
        `java.io.FileNotFoundException`

    - #### LOutChannel

          public LOutChannel(java.io.File f)
                      throws java.io.FileNotFoundException

      Parameters:
        `f` - File to open a channel to.
      Throws:
        `java.io.FileNotFoundException`

  - ### Method Detail

    - #### openOutput

          public void openOutput(java.lang.String path)
                          throws java.io.FileNotFoundException

      Specified by:
        `openOutput` in class `LExport`
      Parameters:
        `path` - Path to open a channel to.
      Throws:
        `java.io.FileNotFoundException`

    - #### write

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

      Description copied from class: `LExport`
      Writes a byte array to the file.
      Specified by:
        `write` in class `LExport`
      Throws:
        `java.io.IOException`

    - #### write

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

      Specified by:
        `write` in class `LExport`
      Parameters:
        `b` -
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Description copied from class: `LExport`
      Flushes buffer and closes output stream.
      Specified by:
        `close` in class `LExport`
      Throws:
        `java.io.IOException`

    - #### markLength

          public void markLength(int size)
                          throws java.io.IOException

      A stack-based system where you can declare an amount of bytes to represent the length of some upcoming data. Later on you can closeLength() which will update the bytes to contain the size of the data in-between.
      Parameters:
        `size` - Number of bytes to write/reserve for the length information.
      Throws:
        `java.io.IOException`

    - #### closeLength

          public void closeLength()
                           throws java.io.IOException

      Used in conjunction with markLength(int). Updates the most recent markLength(int) reserved bytes to contain the length of data in between them and the current position.
      Throws:
        `java.io.IOException`

    - #### setPosMarker

          public void setPosMarker(int size)
                            throws java.io.IOException

      A queue-based system where you can declare an amount of bytes to represent the position of some upcoming data. Late on you can fillPosMarker() which will update the bytes to contain the position the channel is currently at.
      Parameters:
        `size` - Number of bytes to write/reserve for the position information.
      Throws:
        `java.io.IOException`

    - #### fillPosMarker

          public void fillPosMarker()
                             throws java.io.IOException

      Used in conjunction with setPosMarker(int). Updates the next-in-queue setPosMarker(int) reserved bytes to contain the current position of the channel.
      Throws:
        `java.io.IOException`

    - #### pos

          public void pos(long set)
                   throws java.io.IOException

      Parameters:
        `set` -
      Throws:
        `java.io.IOException`

    - #### pos

          public long pos()
                   throws java.io.IOException

      Returns:
      Throws:
        `java.io.IOException`