Class LittleEndian

java.lang.Object
jp.gr.java_conf.dangan.io.LittleEndian

public class LittleEndian extends Object
???g???G???f?B?A???? ?o?C?g?z???? InputStream, OutputStream ???A?N?Z?X???????\?b?h?????????????[?e?B???e?B?N???X?B
 -- revision history --
 $Log: LittleEndian.java,v $
 Revision 1.0  2002/07/24 00:00:00  dangan
 add to version control
 [change]
     writeByte(), readByte() ???P???B
 [maintenance]
     ?\?[?X????

 
Version:
$Revision: 1.0 $
Author:
$Author: dangan $
  • Method Summary

    Modifier and Type
    Method
    Description
    static final int
    readInt(byte[] ByteArray, int index)
    ByteArray ?? index ?????u???????g???G???f?B?A???? 4?o?C?g?l???????o???B
    static final int
    ?????X?g???[?? in ???? ???g???G???f?B?A???? 4byte?l???????o???B
    static final long
    readLong(byte[] ByteArray, int index)
    ByteArray ?? index ?????u???????g???G???f?B?A???? 8?o?C?g?l???????o???B
    static final long
    ?????X?g???[?? in ???? ???g???G???f?B?A???? 8byte?l???????o???B
    static final int
    readShort(byte[] ByteArray, int index)
    ByteArray ?? index ?????u???? ???g???G???f?B?A???? 2?o?C?g?l???????o???B?????o?????? 2?o?C?g?l?? 0x0000?`0xFFFF???}?b?v???????B
    static final int
    ?????X?g???[?? in ???? ???g???G???f?B?A???? 2byte?l???????o???B
    static final void
    writeInt(byte[] ByteArray, int index, int value)
    ByteArray ?? index ?????u?????g???G???f?B?A???? 4byte?l???????o???B
    static final void
    writeInt(OutputStream out, int value)
    ?o???X?g???[?? out ?? ???g???G???f?B?A???? 4?o?C?g?l???????o???B
    static final void
    writeLong(byte[] ByteArray, int index, long value)
    ByteArray ?? index ?????u?????g???G???f?B?A???? 8byte?l???????o???B
    static final void
    writeLong(OutputStream out, long value)
    ?o???X?g???[?? out ?? ???g???G???f?B?A???? 8?o?C?g?l???????o???B
    static final void
    writeShort(byte[] ByteArray, int index, int value)
    ByteArray ?? index ?????u?????g???G???f?B?A???? 2byte?l???????o???B
    static final void
    writeShort(OutputStream out, int value)
    ?o???X?g???[?? out ?? ???g???G???f?B?A???? 2?o?C?g?????o???B

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • readShort

      public static final int readShort(byte[] ByteArray, int index)
      ByteArray ?? index ?????u???? ???g???G???f?B?A???? 2?o?C?g?l???????o???B?????o?????? 2?o?C?g?l?? 0x0000?`0xFFFF???}?b?v???????B
      Parameters:
      ByteArray - ?o?C?g?z??
      index - ByteArray?????f?[?^???J?n???u
      Returns:
      ?????o??????2?o?C?g?l
      Throws:
      ArrayIndexOutOfBoundsException - index?????n?????f?[?^?? ByteArray??????????????????B
    • readInt

      public static final int readInt(byte[] ByteArray, int index)
      ByteArray ?? index ?????u???????g???G???f?B?A???? 4?o?C?g?l???????o???B
      Parameters:
      ByteArray - ?o?C?g?z??
      index - ByteArray?????f?[?^???J?n???u
      Returns:
      ?????o??????4?o?C?g?l
      Throws:
      ArrayIndexOutOfBoundsException - index?????n?????f?[?^?? ByteArray??????????????????B
    • readLong

      public static final long readLong(byte[] ByteArray, int index)
      ByteArray ?? index ?????u???????g???G???f?B?A???? 8?o?C?g?l???????o???B
      Parameters:
      ByteArray - ?o?C?g?z??
      index - ByteArray?????f?[?^???J?n???u
      Returns:
      ?????o??????8?o?C?g?l
      Throws:
      ArrayIndexOutOfBoundsException - index?????n?????f?[?^?? ByteArray??????????????????B
    • readShort

      public static final int readShort(InputStream in) throws IOException
      ?????X?g???[?? in ???? ???g???G???f?B?A???? 2byte?l???????o???B
      Parameters:
      in - ?????X?g???[??
      Returns:
      ?????o??????2byte?l
      Throws:
      EOFException - ???? End Of Stream???B??????????A ???????????r???? End Of Stream???B?????B ?????????r?????f?[?^???????????B
      IOException - ???o???G???[?????????????
    • readInt

      public static final int readInt(InputStream in) throws IOException
      ?????X?g???[?? in ???? ???g???G???f?B?A???? 4byte?l???????o???B
      Parameters:
      in - ?????X?g???[??
      Returns:
      ?????o??????4byte?l
      Throws:
      EOFException - ???? End Of Stream???B??????????A ???????????r???? End Of Stream???B?????B ?????????r?????f?[?^???????????B
      IOException - ???o???G???[?????????????
    • readLong

      public static final long readLong(InputStream in) throws IOException
      ?????X?g???[?? in ???? ???g???G???f?B?A???? 8byte?l???????o???B
      Parameters:
      in - ?????X?g???[??
      Returns:
      ?????o??????8byte?l
      Throws:
      EOFException - ???? End Of Stream???B??????????A ???????????r???? End Of Stream???B?????B ?????????r?????f?[?^???????????B
      IOException - ???o???G???[?????????????
    • writeShort

      public static final void writeShort(byte[] ByteArray, int index, int value)
      ByteArray ?? index ?????u?????g???G???f?B?A???? 2byte?l???????o???B
      Parameters:
      ByteArray - ?o?C?g?z??
      index - ByteArray?????f?[?^???????}?????u
      value - ?????}?? 2byte?l
      Throws:
      ArrayIndexOutOfBoundsException - index?????n?????f?[?^?? ByteArray??????????????????B
    • writeInt

      public static final void writeInt(byte[] ByteArray, int index, int value)
      ByteArray ?? index ?????u?????g???G???f?B?A???? 4byte?l???????o???B
      Parameters:
      ByteArray - ?o?C?g?z??
      index - ByteArray?????f?[?^???????}?????u
      value - ?????}?? 4byte?l
      Throws:
      ArrayIndexOutOfBoundsException - index?????n?????f?[?^?? ByteArray??????????????????B
    • writeLong

      public static final void writeLong(byte[] ByteArray, int index, long value)
      ByteArray ?? index ?????u?????g???G???f?B?A???? 8byte?l???????o???B
      Parameters:
      ByteArray - ?o?C?g?z??
      index - ByteArray?????f?[?^???????}?????u
      value - ?????}?? 8byte?l
      Throws:
      ArrayIndexOutOfBoundsException - index?????n?????f?[?^?? ByteArray??????????????????B
    • writeShort

      public static final void writeShort(OutputStream out, int value) throws IOException
      ?o???X?g???[?? out ?? ???g???G???f?B?A???? 2?o?C?g?????o???B
      Parameters:
      out - ?o???X?g???[??
      value - ?????o??2?o?C?g?l
      Throws:
      IOException - ???o???G???[?????????????
    • writeInt

      public static final void writeInt(OutputStream out, int value) throws IOException
      ?o???X?g???[?? out ?? ???g???G???f?B?A???? 4?o?C?g?l???????o???B
      Parameters:
      out - ?o???X?g???[??
      value - ?????o??1?o?C?g?l
      Throws:
      IOException - ???o???G???[?????????????
    • writeLong

      public static final void writeLong(OutputStream out, long value) throws IOException
      ?o???X?g???[?? out ?? ???g???G???f?B?A???? 8?o?C?g?l???????o???B
      Parameters:
      out - ?o???X?g???[??
      value - ?????o??1?o?C?g?l
      Throws:
      IOException - ???o???G???[?????????????