@Test public void write() throws IOException { PtpIpPacket given = new CancelPacket(UINT32.MAX_VALUE); byte[] expected = given.bytes(); pos.write(new CancelPacket(UINT32.MAX_VALUE)); byte[] actual = baos.toByteArray(); assertThat(actual, is(expected)); }
public void write(PtpIpPacket packet) throws IOException { os.write(packet.bytes()); os.flush(); }
PtpIpOutputStream implements Closeable { public void write(PtpIpPacket packet) throws IOException { os.write(packet.bytes()); os.flush(); } }
PtpIpOutputStream implements Closeable { public void write(PtpIpPacket packet) throws IOException { os.write(packet.bytes()); os.flush(); } PtpIpOutputStream(OutputStream os); }
PtpIpOutputStream implements Closeable { public void write(PtpIpPacket packet) throws IOException { os.write(packet.bytes()); os.flush(); } PtpIpOutputStream(OutputStream os); void write(PtpIpPacket packet); void writeData(UINT32 transactionID, byte[] data); @Override void close(); }
PtpIpOutputStream implements Closeable { public void write(PtpIpPacket packet) throws IOException { os.write(packet.bytes()); os.flush(); } PtpIpOutputStream(OutputStream os); void write(PtpIpPacket packet); void writeData(UINT32 transactionID, byte[] data); @Override void close();  }