## com.bbn.openmap.dataAccess.shape.output
Class LittleEndianOutputStream

    java.lang.Object
      java.io.OutputStream
          java.io.FilterOutputStream
              java.io.DataOutputStream
                  com.bbn.openmap.dataAccess.shape.output.LittleEndianOutputStream

All Implemented Interfaces:
  java.io.DataOutput

public class LittleEndianOutputStream
extends java.io.DataOutputStream

Provides methods for writing data to an output stream in LittleEndian and BigEndian. Adapted from the book, Java IO, Elliotte Rusty Harold, Ch. 7.

Author:
  Doug Van Auken

Field Summary
`protected int` `written`

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

Constructor Summary
`LittleEndianOutputStream(java.io.OutputStream out)` Constructor out The output stream to chain this one to.

Method Summary
`void` `writeLEChar(int c)` Writes a number of type char in little endian param c An integer that is upcast from a Char data type.
`void` `writeLEChars(java.lang.String s)` Writes a String in little endian
`void` `writeLEDouble(double d)` Writes a number a number of type double in little endian
`void` `writeLEFloat(float f)` Writes a number of type float in little endian
`void` `writeLEInt(int i)` Writes a number of type int in little endian
`void` `writeLELong(long l)` Writes a number of type long in little endian
`void` `writeLEShort(short s)` Writes a number of type short in little endian
`void` `writeLEUTF(java.lang.String s)`
`void` `writeString(java.lang.String string, int length)`

Methods inherited from class java.io.DataOutputStream
`flush, size, write, write, 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`

Field Detail

### written

    protected int written

Constructor Detail

### LittleEndianOutputStream

    public LittleEndianOutputStream(java.io.OutputStream out)

  Constructor out The output stream to chain this one to.

Method Detail

### writeString

    public void writeString(java.lang.String string,
                            int length)
                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### writeLEShort

    public void writeLEShort(short s)
                      throws java.io.IOException

  Writes a number of type short in little endian

  Parameters:
    `s` - A number of type short
  Throws:
    `java.io.IOException`

### writeLEChar

    public void writeLEChar(int c)
                     throws java.io.IOException

  Writes a number of type char in little endian param c An integer that is upcast from a Char data type.

  Throws:
    `java.io.IOException`

### writeLEInt

    public void writeLEInt(int i)
                    throws java.io.IOException

  Writes a number of type int in little endian

  Parameters:
    `i` - A number of type int
  Throws:
    `java.io.IOException`

### writeLELong

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

  Writes a number of type long in little endian

  Parameters:
    `l` - A number of type long
  Throws:
    `java.io.IOException`

### writeLEFloat

    public final void writeLEFloat(float f)
                            throws java.io.IOException

  Writes a number of type float in little endian

  Parameters:
    `f` - A number of type float.
  Throws:
    `java.io.IOException`

### writeLEDouble

    public final void writeLEDouble(double d)
                             throws java.io.IOException

  Writes a number a number of type double in little endian

  Parameters:
    `d` - A number of type double
  Throws:
    `java.io.IOException`

### writeLEChars

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

  Writes a String in little endian

  Parameters:
    `s` - A string
  Throws:
    `java.io.IOException`

### writeLEUTF

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

  Throws:
    `java.io.IOException`

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details