示例#1
0
 public static final FieldPacket getField(BinaryPacket src, String fieldName) {
   FieldPacket field = new FieldPacket();
   field.read(src);
   field.name = encode(fieldName, CODE_PAGE_1252);
   field.packetLength = field.calcPacketSize();
   return field;
 }
示例#2
0
 public static final FieldPacket getField(String name, int type) {
   FieldPacket packet = new FieldPacket();
   packet.charsetIndex = CharsetUtil.getIndex(CODE_PAGE_1252);
   packet.name = encode(name, CODE_PAGE_1252);
   packet.type = (byte) type;
   return packet;
 }