@@ -0,0 +1,1261 @@
+%0Aimport java.nio.ByteBuffer;%0Aimport java.nio.charset.Charset;%0A%0A/**%0A *%0A * @author Typhoid%0A */%0Apublic class helper %7B%0A    public static ByteBuffer string2bb(String msg, Charset charset)%7B%0A    return ByteBuffer.wrap(msg.getBytes(charset));%0A%7D%0A  public static String bb2string(ByteBuffer buffer, Charset charset)%7B%0A    byte%5B%5D bytes;%0A    if(buffer.hasArray()) %7B%0A        bytes = buffer.array();%0A    %7D else %7B%0A        bytes = new byte%5Bbuffer.remaining()%5D;%0A        buffer.get(bytes);%0A    %7D%0A    return new String(bytes, charset);%0A%7D%0A  %0A      public static int transferAsMuchAsPossible(ByteBuffer bbuf_dest, ByteBuffer bbuf_src)%0A%7B%0A  int nTransfer = Math.min(bbuf_dest.remaining(), bbuf_src.remaining());%0A  System.out.println(bbuf_dest.remaining()+%22 YO REMAINING%22);%0A  if (nTransfer %3E 0)%0A  %7B%0A    bbuf_dest.put(bbuf_src.array(), %0A                  bbuf_src.arrayOffset()+bbuf_src.position(), %0A                  nTransfer);%0A    bbuf_src.position(bbuf_src.position()+nTransfer);%0A                String v = bb2string( bbuf_dest, Charset.forName(%22UTF-8%22) );%0ASystem.out.println(v+%22Yo this the string boi%22);%0A  String b = bb2string(bbuf_src, Charset.forName(%22UTF-8%22));%0A  System.out.println(bbuf_dest.position());%0A  System.out.println(%22wtf man %22+b);%0A   %7D%0A  return nTransfer;%0A%7D%0A  %0A  %0A  %0A%7D%0A

Create Helper.java