Package JP.digitune.util

Examples of JP.digitune.util.ByteBuffer


    System.arraycopy(buf, indexes[3] + 1, packbuf, 0, packbuf.length);
    pack = new IPMPack(packbuf);
  }
 
  public byte[] getBytes() {
    ByteBuffer bb = new ByteBuffer();
    String prefix = fromaddr.toString() + ":" + toaddr.toString() + ":";
    bb.append(prefix.getBytes());
    bb.append(pack.getBytes());
    byte[] suffix = new byte[]{0, 0, 0};
    bb.append(suffix);
    return bb.getBytes();
  }
View Full Code Here


        .get(new Integer(ipme.getIPMAddress().getPort())) != null)
        return;
    } catch (UnknownHostException ex) {}
    if (IPtoPORT.get(ipme.getIPMAddress().toString()) != null)
      return;
    ByteBuffer bb = new ByteBuffer();
    String prefix = ipme.getIPMAddress().toString() + ":"
      + (String) PORTtoIP.get(new Integer(ipme.getLocalPort())) + ":";
    bb.append(prefix.getBytes());
    bb.append(ipme.getPack().getBytes());
    bb.append(new byte[]{0, 0, 0});
    write(bb.getBytes());
  }
View Full Code Here

    strbuf.append(extra);
    String tmpstr = new String(strbuf);
    String ls = System.getProperty("line.separator", "\n");
    String cr = "\n";
    tmpstr = StringReplacer.replaceString(tmpstr, ls, cr);
    ByteBuffer bb = new ByteBuffer();
    try {
      bb.append(tmpstr.getBytes("SJIS"));
    } catch (UnsupportedEncodingException ex) {
      ex.printStackTrace();
      return;
    }
    byte[] nullbyte = { 0 };
    bb.append(nullbyte);
    if (group != null && !group.equals("")) {
      try {
        bb.append(group.getBytes("SJIS"));
        bb.append(nullbyte);
      } catch (UnsupportedEncodingException ex) {}
    }
    pack = bb.getBytes();
  }
View Full Code Here

TOP

Related Classes of JP.digitune.util.ByteBuffer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.