1 package com.maverick.multiplex; 2 3 import java.io.IOException ; 4 5 import com.maverick.util.ByteArrayWriter; 6 7 18 public class Packet extends ByteArrayWriter { 19 20 public Packet() throws IOException { 21 writeInt(0); 22 } 23 24 public void prepare() { 25 encodeInt(buf, 0, size() - 4); 26 } 27 28 public void reset() { 29 super.reset(); 30 try { 31 writeInt(0); 32 } catch (IOException e) { 33 } 34 } 35 } 36 | Popular Tags |