Esempio n. 1
0
 public static byte[] getNBOPort(short p) {
   ByteBuffer buf = ByteBuffer.allocate(2);
   buf.putShort((short) p);
   buf.order(ByteOrder.BIG_ENDIAN);
   buf.rewind();
   byte[] rtn = new byte[2];
   buf.get(rtn);
   return rtn;
 }
Esempio n. 2
0
 public static byte[] getNBOHost(String h) {
   if (h.equals(PEER)) return null;
   byte hostBytes[] = h.getBytes();
   int len = Array.getLength(hostBytes);
   ByteBuffer buf = ByteBuffer.allocate(len);
   buf.put(hostBytes);
   buf.order(ByteOrder.BIG_ENDIAN);
   buf.rewind();
   return (buf.array());
 }
 public static FileCloseResponse getRootAsFileCloseResponse(
     ByteBuffer _bb, FileCloseResponse obj) {
   _bb.order(ByteOrder.LITTLE_ENDIAN);
   return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb));
 }
 public static MbGetInstalledRomsResponse getRootAsMbGetInstalledRomsResponse(
     ByteBuffer _bb, MbGetInstalledRomsResponse obj) {
   _bb.order(ByteOrder.LITTLE_ENDIAN);
   return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb));
 }
 public static PathSELinuxGetLabelRequest getRootAsPathSELinuxGetLabelRequest(
     ByteBuffer _bb, PathSELinuxGetLabelRequest obj) {
   _bb.order(ByteOrder.LITTLE_ENDIAN);
   return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb));
 }
Esempio n. 6
0
 public static TableInFirstNS getRootAsTableInFirstNS(ByteBuffer _bb, TableInFirstNS obj) {
   _bb.order(ByteOrder.LITTLE_ENDIAN);
   return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb));
 }
 public static Monster getRootAsMonster(ByteBuffer _bb, Monster obj) {
   _bb.order(ByteOrder.LITTLE_ENDIAN);
   return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb));
 }
 public static SetKernelRequest getRootAsSetKernelRequest(ByteBuffer _bb) {
   _bb.order(ByteOrder.LITTLE_ENDIAN);
   return (new SetKernelRequest()).__init(_bb.getInt(_bb.position()) + _bb.position(), _bb);
 }
Esempio n. 9
0
 public static Stat getRootAsStat(ByteBuffer _bb, Stat obj) {
   _bb.order(ByteOrder.LITTLE_ENDIAN);
   return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb));
 }