📄 integer1.java
字号:
package com.tssx.ebiz.sgip;
import java.io.*;
public class Integer1{
int m_i;
public Integer1() {
super();
m_i = 0;
}
public Integer1(int i) {
super();
m_i = i;
}
public int length() {
return 1;
}
public int maxLength() {
return 1;
}
public void setMaxLength(int len) throws SgipException {
if (len != 1) {
throw new SgipException ("Invalid max length for Integer1.");
}
}
public int read(DataInputStream is) throws IOException,SgipException {
return read(is, 0x7FFFFFFF);
}
public int read(DataInputStream is, int iLeft) throws IOException, SgipException {
if (iLeft < 1) {
throw new SgipException("Integer1::read() - Not enought bytes in stream to read.");
}
m_i = is.readUnsignedByte();
return 1;
}
public int write(DataOutputStream os) throws IOException {
os.writeByte(m_i);
return 1;
}
public int intValue() {
return (int) m_i;
}
public void setValue(int i) {
m_i = (short) i;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -