Exemple #1
0
 public MessageRunnable(int msz, int mtp, DataInputStream di)
     throws IOException, SocketException {
   msgsize = msz;
   msgtype = mtp;
   msgbytes = new byte[msgsize - 2];
   di.readFully(msgbytes);
   // di.read(msgbytes);
   din = new DataInputStream(new ByteArrayInputStream(msgbytes));
 }
  private byte[] loadClassData(String name) throws IOException {
    FileInputStream f = new FileInputStream("CrashClass.class");
    int size = (int) f.getChannel().size();
    DataInputStream s = new DataInputStream(f);

    byte[] b = new byte[size];
    s.readFully(b);
    s.close();

    return b;
  }