Package jp.gr.java_conf.dangan.io
Class LittleEndian
java.lang.Object
jp.gr.java_conf.dangan.io.LittleEndian
???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 TypeMethodDescriptionstatic final int
readInt
(byte[] ByteArray, int index) ByteArray ?? index ?????u???????g???G???f?B?A???? 4?o?C?g?l???????o???Bstatic final int
readInt
(InputStream in) ?????X?g???[?? in ???? ???g???G???f?B?A???? 4byte?l???????o???Bstatic final long
readLong
(byte[] ByteArray, int index) ByteArray ?? index ?????u???????g???G???f?B?A???? 8?o?C?g?l???????o???Bstatic final long
readLong
(InputStream in) ?????X?g???[?? in ???? ???g???G???f?B?A???? 8byte?l???????o???Bstatic 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???????Bstatic final int
readShort
(InputStream in) ?????X?g???[?? in ???? ???g???G???f?B?A???? 2byte?l???????o???Bstatic final void
writeInt
(byte[] ByteArray, int index, int value) ByteArray ?? index ?????u?????g???G???f?B?A???? 4byte?l???????o???Bstatic final void
writeInt
(OutputStream out, int value) ?o???X?g???[?? out ?? ???g???G???f?B?A???? 4?o?C?g?l???????o???Bstatic final void
writeLong
(byte[] ByteArray, int index, long value) ByteArray ?? index ?????u?????g???G???f?B?A???? 8byte?l???????o???Bstatic final void
writeLong
(OutputStream out, long value) ?o???X?g???[?? out ?? ???g???G???f?B?A???? 8?o?C?g?l???????o???Bstatic final void
writeShort
(byte[] ByteArray, int index, int value) ByteArray ?? index ?????u?????g???G???f?B?A???? 2byte?l???????o???Bstatic final void
writeShort
(OutputStream out, int value) ?o???X?g???[?? out ?? ???g???G???f?B?A???? 2?o?C?g?????o???B
-
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
?????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?[?^???????????BIOException
- ???o???G???[?????????????
-
readInt
?????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?[?^???????????BIOException
- ???o???G???[?????????????
-
readLong
?????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?[?^???????????BIOException
- ???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?[?^???????}?????uvalue
- ?????}?? 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?[?^???????}?????uvalue
- ?????}?? 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?[?^???????}?????uvalue
- ?????}?? 8byte?l- Throws:
ArrayIndexOutOfBoundsException
- index?????n?????f?[?^?? ByteArray??????????????????B
-
writeShort
?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
?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
?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???[?????????????
-