Package jp.gr.java_conf.dangan.io
Class LittleEndian
- java.lang.Object
-
- jp.gr.java_conf.dangan.io.LittleEndian
-
public class LittleEndian extends java.lang.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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
readInt(byte[] ByteArray, int index)
ByteArray ?? index ?????u???????g???G???f?B?A???? 4?o?C?g?l???????o???Bstatic int
readInt(java.io.InputStream in)
?????X?g???[?? in ???? ???g???G???f?B?A???? 4byte?l???????o???Bstatic long
readLong(byte[] ByteArray, int index)
ByteArray ?? index ?????u???????g???G???f?B?A???? 8?o?C?g?l???????o???Bstatic long
readLong(java.io.InputStream in)
?????X?g???[?? in ???? ???g???G???f?B?A???? 8byte?l???????o???Bstatic 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 int
readShort(java.io.InputStream in)
?????X?g???[?? in ???? ???g???G???f?B?A???? 2byte?l???????o???Bstatic void
writeInt(byte[] ByteArray, int index, int value)
ByteArray ?? index ?????u?????g???G???f?B?A???? 4byte?l???????o???Bstatic void
writeInt(java.io.OutputStream out, int value)
?o???X?g???[?? out ?? ???g???G???f?B?A???? 4?o?C?g?l???????o???Bstatic void
writeLong(byte[] ByteArray, int index, long value)
ByteArray ?? index ?????u?????g???G???f?B?A???? 8byte?l???????o???Bstatic void
writeLong(java.io.OutputStream out, long value)
?o???X?g???[?? out ?? ???g???G???f?B?A???? 8?o?C?g?l???????o???Bstatic void
writeShort(byte[] ByteArray, int index, int value)
ByteArray ?? index ?????u?????g???G???f?B?A???? 2byte?l???????o???Bstatic void
writeShort(java.io.OutputStream out, int value)
?o???X?g???[?? out ?? ???g???G???f?B?A???? 2?o?C?g?????o???B
-
-
-
Method Detail
-
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:
java.lang.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:
java.lang.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:
java.lang.ArrayIndexOutOfBoundsException
- index?????n?????f?[?^?? ByteArray??????????????????B
-
readShort
public static final int readShort(java.io.InputStream in) throws java.io.IOException
?????X?g???[?? in ???? ???g???G???f?B?A???? 2byte?l???????o???B- Parameters:
in
- ?????X?g???[??- Returns:
- ?????o??????2byte?l
- Throws:
java.io.EOFException
- ???? End Of Stream???B??????????A ???????????r???? End Of Stream???B?????B ?????????r?????f?[?^???????????Bjava.io.IOException
- ???o???G???[?????????????
-
readInt
public static final int readInt(java.io.InputStream in) throws java.io.IOException
?????X?g???[?? in ???? ???g???G???f?B?A???? 4byte?l???????o???B- Parameters:
in
- ?????X?g???[??- Returns:
- ?????o??????4byte?l
- Throws:
java.io.EOFException
- ???? End Of Stream???B??????????A ???????????r???? End Of Stream???B?????B ?????????r?????f?[?^???????????Bjava.io.IOException
- ???o???G???[?????????????
-
readLong
public static final long readLong(java.io.InputStream in) throws java.io.IOException
?????X?g???[?? in ???? ???g???G???f?B?A???? 8byte?l???????o???B- Parameters:
in
- ?????X?g???[??- Returns:
- ?????o??????8byte?l
- Throws:
java.io.EOFException
- ???? End Of Stream???B??????????A ???????????r???? End Of Stream???B?????B ?????????r?????f?[?^???????????Bjava.io.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?[?^???????}?????uvalue
- ?????}?? 2byte?l- Throws:
java.lang.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:
java.lang.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:
java.lang.ArrayIndexOutOfBoundsException
- index?????n?????f?[?^?? ByteArray??????????????????B
-
writeShort
public static final void writeShort(java.io.OutputStream out, int value) throws java.io.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:
java.io.IOException
- ???o???G???[?????????????
-
writeInt
public static final void writeInt(java.io.OutputStream out, int value) throws java.io.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:
java.io.IOException
- ???o???G???[?????????????
-
writeLong
public static final void writeLong(java.io.OutputStream out, long value) throws java.io.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:
java.io.IOException
- ???o???G???[?????????????
-
-