本文整理了Java中java.io.DataInputStream.readUnsignedByte()
方法的一些代码示例,展示了DataInputStream.readUnsignedByte()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataInputStream.readUnsignedByte()
方法的具体详情如下:
包路径:java.io.DataInputStream
类名称:DataInputStream
方法名:readUnsignedByte
[英]See the general contract of the readUnsignedByte
method of DataInput
.
Bytes for this operation are read from the contained input stream.
[中]
代码示例来源:origin: netty/netty
@Override
public final int readUnsignedByte() throws IOException {
return in.readUnsignedByte();
}
代码示例来源:origin: libgdx/libgdx
public final int readUnsignedByte () throws IOException {
return dis.readUnsignedByte();
}
代码示例来源:origin: libgdx/libgdx
public int readUnsignedByte () throws IOException {
return din.readUnsignedByte();
}
代码示例来源:origin: libgdx/libgdx
public final int readUnsignedByte () throws IOException {
return dis.readUnsignedByte();
}
代码示例来源:origin: libgdx/libgdx
public int readUnsignedByte () throws IOException {
return din.readUnsignedByte();
}
代码示例来源:origin: redisson/redisson
@Override
public final int readUnsignedByte() throws IOException {
return in.readUnsignedByte();
}
代码示例来源:origin: libgdx/libgdx
public short readShort () throws IOException {
int a = is.read();
int b = readUnsignedByte();
return (short)((a << 8) | b);
}
代码示例来源:origin: libgdx/libgdx
public int readUnsignedShort () throws IOException {
int a = is.read();
int b = readUnsignedByte();
return ((a << 8) | b);
}
代码示例来源:origin: libgdx/libgdx
public int readUnsignedShort () throws IOException {
int a = is.read();
int b = readUnsignedByte();
return ((a << 8) | b);
}
代码示例来源:origin: libgdx/libgdx
public char readChar () throws IOException {
int a = is.read();
int b = readUnsignedByte();
return (char)((a << 8) | b);
}
代码示例来源:origin: libgdx/libgdx
public char readChar () throws IOException {
int a = is.read();
int b = readUnsignedByte();
return (char)((a << 8) | b);
}
代码示例来源:origin: libgdx/libgdx
public short readShort () throws IOException {
int a = is.read();
int b = readUnsignedByte();
return (short)((a << 8) | b);
}
代码示例来源:origin: redisson/redisson
public MethodHandleInfo(DataInputStream in, int index) throws IOException {
super(index);
refKind = in.readUnsignedByte();
refIndex = in.readUnsignedShort();
}
代码示例来源:origin: libgdx/libgdx
public int readInt () throws IOException {
int a = is.read();
int b = is.read();
int c = is.read();
int d = readUnsignedByte();
return (a << 24) | (b << 16) | (c << 8) | d;
}
代码示例来源:origin: libgdx/libgdx
public int readInt () throws IOException {
int a = is.read();
int b = is.read();
int c = is.read();
int d = readUnsignedByte();
return (a << 24) | (b << 16) | (c << 8) | d;
}
代码示例来源:origin: libgdx/libgdx
private int readUtfChar (StringBuilder sb) throws IOException {
int a = readUnsignedByte();
if ((a & 0x80) == 0) {
sb.append((char)a);
return 1;
}
if ((a & 0xe0) == 0xc0) {
int b = readUnsignedByte();
sb.append((char)(((a & 0x1F) << 6) | (b & 0x3F)));
return 2;
}
if ((a & 0xf0) == 0xe0) {
int b = readUnsignedByte();
int c = readUnsignedByte();
sb.append((char)(((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F)));
return 3;
}
throw new UTFDataFormatException();
}
代码示例来源:origin: libgdx/libgdx
private int readUtfChar (StringBuilder sb) throws IOException {
int a = readUnsignedByte();
if ((a & 0x80) == 0) {
sb.append((char)a);
return 1;
}
if ((a & 0xe0) == 0xc0) {
int b = readUnsignedByte();
sb.append((char)(((a & 0x1F) << 6) | (b & 0x3F)));
return 2;
}
if ((a & 0xf0) == 0xe0) {
int b = readUnsignedByte();
int c = readUnsignedByte();
sb.append((char)(((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F)));
return 3;
}
throw new UTFDataFormatException();
}
代码示例来源:origin: org.javassist/javassist
public MethodHandleInfo(DataInputStream in, int index)
throws IOException
{
super(index);
refKind = in.readUnsignedByte();
refIndex = in.readUnsignedShort();
}
代码示例来源:origin: apache/geode
private int readResourceInstId() throws IOException {
int token = dataIn.readUnsignedByte();
if (token <= MAX_BYTE_RESOURCE_INST_ID) {
return token;
} else if (token == ILLEGAL_RESOURCE_INST_ID_TOKEN) {
return ILLEGAL_RESOURCE_INST_ID;
} else if (token == SHORT_RESOURCE_INST_ID_TOKEN) {
return dataIn.readUnsignedShort();
} else { /* token == INT_RESOURCE_INST_ID_TOKEN */
return dataIn.readInt();
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public int readUnsignedByte() {
try {
return getStream().readUnsignedByte();
} catch (Exception e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
内容来源于网络,如有侵权,请联系作者删除!