String text = "--boundary\r\n";
ByteArrayInputStream bis = new ByteArrayInputStream(text.getBytes());
BufferedLineReaderInputStream buffer = new BufferedLineReaderInputStream(bis, 4096);
MimeBoundaryInputStream stream =
new MimeBoundaryInputStream(buffer, "boundary");
assertEquals(-1, stream.read());
text = "\r\n--boundary\r\n";
bis = new ByteArrayInputStream(text.getBytes());
buffer = new BufferedLineReaderInputStream(bis, 4096);
stream =
new MimeBoundaryInputStream(buffer, "boundary");
assertEquals(-1, stream.read());
}