@Test public void testVisitStart() { TestFileLikePart fileLikePart = new TestFileLikePart("Name"); try (TestMultipartPart multipartPart = new TestMultipartPart(fileLikePart, new byte[10])) { CounterPartVisitor counterVisitor = new CounterPartVisitor(); multipartPart.visitStart(counterVisitor); assertEquals(counterVisitor.getCount(), 12, "CounterPartVisitor count for visitStart should match EXTRA_BYTES count plus boundary bytes count"); } }
protected void visitStart(PartVisitor visitor) { visitor.withBytes(EXTRA_BYTES); visitor.withBytes(boundary); }
MultipartPart implements Closeable { protected void visitStart(PartVisitor visitor) { visitor.withBytes(EXTRA_BYTES); visitor.withBytes(boundary); } }
MultipartPart implements Closeable { protected void visitStart(PartVisitor visitor) { visitor.withBytes(EXTRA_BYTES); visitor.withBytes(boundary); } MultipartPart(T part, byte[] boundary); }
MultipartPart implements Closeable { protected void visitStart(PartVisitor visitor) { visitor.withBytes(EXTRA_BYTES); visitor.withBytes(boundary); } MultipartPart(T part, byte[] boundary); long length(); MultipartState getState(); boolean isTargetSlow(); long transferTo(ByteBuf target); long transferTo(WritableByteChannel target); @Override void close(); }
MultipartPart implements Closeable { protected void visitStart(PartVisitor visitor) { visitor.withBytes(EXTRA_BYTES); visitor.withBytes(boundary); } MultipartPart(T part, byte[] boundary); long length(); MultipartState getState(); boolean isTargetSlow(); long transferTo(ByteBuf target); long transferTo(WritableByteChannel target); @Override void close();  }