integer1.java

来自「WAP PUSH后台源码,WAP PUSH后台源码」· Java 代码 · 共 46 行

JAVA
46
字号
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 + =
减小字号Ctrl + -
显示快捷键?