@Test public void testVisitPostContents() { TestFileLikePart fileLikePart = new TestFileLikePart(null); try (TestMultipartPart multipartPart = new TestMultipartPart(fileLikePart, new byte[0])) { CounterPartVisitor counterVisitor = new CounterPartVisitor(); multipartPart.visitPostContent(counterVisitor); assertEquals(counterVisitor.getCount(), 2, "CounterPartVisitor count for visitPostContent should be equal to 2"); } }
protected void visitPostContent(PartVisitor visitor) { visitor.withBytes(CRLF_BYTES); }
MultipartPart implements Closeable { protected void visitPostContent(PartVisitor visitor) { visitor.withBytes(CRLF_BYTES); } }
MultipartPart implements Closeable { protected void visitPostContent(PartVisitor visitor) { visitor.withBytes(CRLF_BYTES); } MultipartPart(T part, byte[] boundary); }
MultipartPart implements Closeable { protected void visitPostContent(PartVisitor visitor) { visitor.withBytes(CRLF_BYTES); } 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 visitPostContent(PartVisitor visitor) { visitor.withBytes(CRLF_BYTES); } MultipartPart(T part, byte[] boundary); long length(); MultipartState getState(); boolean isTargetSlow(); long transferTo(ByteBuf target); long transferTo(WritableByteChannel target); @Override void close();  }