类 StreamUtils
java.lang.Object
com.huangjian.modbus4j.sero.io.StreamUtils
StreamUtils class.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringdumpArray(byte[] b) dumpArray.static StringdumpArray(byte[] b, int pos, int len) dumpArray.static StringdumpArrayHex(byte[] b) dumpArrayHex.static StringdumpArrayHex(byte[] b, int pos, int len) dumpArrayHex.static StringdumpHex(byte[] b) dumpHex.static StringdumpHex(byte[] b, int pos, int len) dumpHex.static StringdumpMessage(byte[] b) dumpMessage.static StringdumpMessage(byte[] b, int pos, int len) dumpMessage.static byte[]fromHex.static byte[]read(InputStream in) read.static char[]read.static shortread2ByteSigned.static intread2ByteUnsigned.static intread4ByteSigned.static longread4ByteUnsigned.static bytereadByte(InputStream in) readByte.static charreadChar(InputStream in) readChar.static StringreadFile.static StringreadFile.readLines.readLines.static voidreadLines(String filename, LineHandler lineHandler) readLines.static StringreadString(InputStream in, int length) readString.static StringtoHex(byte b) toHex.static StringtoHex(byte[] bs) toHex.static StringtoHex(int i) toHex.static StringtoHex(long l) toHex.static StringtoHex(short s) toHex.static voidtransfer(InputStream in, OutputStream out) transfer.static voidtransfer(InputStream in, OutputStream out, long limit) transfer.static voidtransfer(InputStream in, SocketChannel out) transfer.static voidtransfer.static voidtransfer.static voidwrite2ByteSigned(OutputStream out, short s) write2ByteSigned.static voidwrite2ByteUnsigned(OutputStream out, int i) write2ByteUnsigned.static voidwrite4ByteSigned(OutputStream out, int i) write4ByteSigned.static voidwrite4ByteUnsigned(OutputStream out, long l) write4ByteUnsigned.static voidwriteByte(OutputStream out, byte b) writeByte.static voidwriteChar(OutputStream out, char c) writeChar.static voidwriteFile.static voidwriteFile.static voidwriteString(OutputStream out, String s) writeString.
-
构造器详细资料
-
StreamUtils
public StreamUtils()
-
-
方法详细资料
-
transfer
transfer.
- 参数:
in- aInputStreamobject.out- aOutputStreamobject.- 抛出:
IOException- if any.
-
transfer
transfer.
- 参数:
in- aInputStreamobject.out- aOutputStreamobject.limit- a long.- 抛出:
IOException- if any.
-
transfer
transfer.
- 参数:
in- aInputStreamobject.out- aSocketChannelobject.- 抛出:
IOException- if any.
-
transfer
transfer.
- 参数:
reader- aReaderobject.writer- aWriterobject.- 抛出:
IOException- if any.
-
transfer
transfer.
- 参数:
reader- aReaderobject.writer- aWriterobject.limit- a long.- 抛出:
IOException- if any.
-
read
read.
- 参数:
in- aInputStreamobject.- 返回:
- an array of
objects.
引用无效
byte - 抛出:
IOException- if any.
-
read
read.
- 参数:
reader- aReaderobject.- 返回:
- an array of
objects.
引用无效
char - 抛出:
IOException- if any.
-
readChar
readChar.
- 参数:
in- aInputStreamobject.- 返回:
- a char.
- 抛出:
IOException- if any.
-
readString
readString.
- 参数:
in- aInputStreamobject.length- a int.- 返回:
- a
Stringobject. - 抛出:
IOException- if any.
-
readByte
readByte.
- 参数:
in- aInputStreamobject.- 返回:
- a byte.
- 抛出:
IOException- if any.
-
read4ByteSigned
read4ByteSigned.
- 参数:
in- aInputStreamobject.- 返回:
- a int.
- 抛出:
IOException- if any.
-
read4ByteUnsigned
read4ByteUnsigned.
- 参数:
in- aInputStreamobject.- 返回:
- a long.
- 抛出:
IOException- if any.
-
read2ByteUnsigned
read2ByteUnsigned.
- 参数:
in- aInputStreamobject.- 返回:
- a int.
- 抛出:
IOException- if any.
-
read2ByteSigned
read2ByteSigned.
- 参数:
in- aInputStreamobject.- 返回:
- a short.
- 抛出:
IOException- if any.
-
writeByte
writeByte.
- 参数:
out- aOutputStreamobject.b- a byte.- 抛出:
IOException- if any.
-
writeChar
writeChar.
- 参数:
out- aOutputStreamobject.c- a char.- 抛出:
IOException- if any.
-
writeString
writeString.
- 参数:
out- aOutputStreamobject.s- aStringobject.- 抛出:
IOException- if any.
-
write4ByteSigned
write4ByteSigned.
- 参数:
out- aOutputStreamobject.i- a int.- 抛出:
IOException- if any.
-
write4ByteUnsigned
write4ByteUnsigned.
- 参数:
out- aOutputStreamobject.l- a long.- 抛出:
IOException- if any.
-
write2ByteUnsigned
write2ByteUnsigned.
- 参数:
out- aOutputStreamobject.i- a int.- 抛出:
IOException- if any.
-
write2ByteSigned
write2ByteSigned.
- 参数:
out- aOutputStreamobject.s- a short.- 抛出:
IOException- if any.
-
dumpArray
dumpArray.
- 参数:
b- an array ofobjects.引用无效
byte- 返回:
- a
Stringobject.
-
dumpArray
dumpArray.
- 参数:
b- an array ofobjects.引用无效
bytepos- a int.len- a int.- 返回:
- a
Stringobject.
-
dumpMessage
dumpMessage.
- 参数:
b- an array ofobjects.引用无效
byte- 返回:
- a
Stringobject.
-
dumpMessage
dumpMessage.
- 参数:
b- an array ofobjects.引用无效
bytepos- a int.len- a int.- 返回:
- a
Stringobject.
-
dumpArrayHex
dumpArrayHex.
- 参数:
b- an array ofobjects.引用无效
byte- 返回:
- a
Stringobject.
-
dumpArrayHex
dumpArrayHex.
- 参数:
b- an array ofobjects.引用无效
bytepos- a int.len- a int.- 返回:
- a
Stringobject.
-
dumpHex
dumpHex.
- 参数:
b- an array ofobjects.引用无效
byte- 返回:
- a
Stringobject.
-
dumpHex
dumpHex.
- 参数:
b- an array ofobjects.引用无效
bytepos- a int.len- a int.- 返回:
- a
Stringobject.
-
readFile
readFile.
- 参数:
filename- aStringobject.- 返回:
- a
Stringobject. - 抛出:
IOException- if any.
-
readFile
readFile.
- 参数:
file- aFileobject.- 返回:
- a
Stringobject. - 抛出:
IOException- if any.
-
readLines
readLines.
- 参数:
filename- aStringobject.- 返回:
- a
Listobject. - 抛出:
IOException- if any.
-
readLines
readLines.
- 参数:
file- aFileobject.- 返回:
- a
Listobject. - 抛出:
IOException- if any.
-
writeFile
writeFile.
- 参数:
filename- aStringobject.content- aStringobject.- 抛出:
IOException- if any.
-
writeFile
writeFile.
- 参数:
file- aFileobject.content- aStringobject.- 抛出:
IOException- if any.
-
readLines
readLines.
- 参数:
filename- aStringobject.lineHandler- aLineHandlerobject.- 抛出:
IOException- if any.
-
toHex
toHex.
- 参数:
bs- an array ofobjects.引用无效
byte- 返回:
- a
Stringobject.
-
toHex
toHex.
- 参数:
b- a byte.- 返回:
- a
Stringobject.
-
toHex
toHex.
- 参数:
s- a short.- 返回:
- a
Stringobject.
-
toHex
toHex.
- 参数:
i- a int.- 返回:
- a
Stringobject.
-
toHex
toHex.
- 参数:
l- a long.- 返回:
- a
Stringobject.
-
fromHex
fromHex.
- 参数:
s- aStringobject.- 返回:
- an array of
objects.
引用无效
byte
-