?? businessinhelper.java~1~
字號:
package com.soft.QQ;
import java.io.*;
import java.nio.ByteBuffer;
import static com.sun.UDP.Config.*;
import java.nio.ByteOrder;
public class BusinessInHelper {
private ByteBuffer bb;
private int len;
public BusinessInHelper(byte[] buf) {
if (buf != null) {
this.len = buf.length - END_SYMBOL.length();
bb = ByteBuffer.wrap(buf, 0, len);
bb.order(ByteOrder.LITTLE_ENDIAN);
}
}
public int getInt() {
return bb.getInt();
}
public long getLong(){
return bb.getLong();
}
public String getString(int length) throws IOException {
byte[] buf = new byte[length];
for (int i = 0; i < length; i++) {
buf[i] = bb.get();
}
return new String(buf, "GBK").trim();
}
public String getString(int length, String encode) throws IOException {
byte[] buf = new byte[length];
for (int i = 0; i < length; i++) {
buf[i] = bb.get();
}
return new String(buf, encode).trim();
}
public byte getByte() {
return bb.get();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -