@Test public void testCRLFPresent() throws IOException { String data = "Subject: test\r\n\r\ndata\r\n"; checkRead(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), data); checkReadViaArray(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), data); }
@Test public void testCRPresent() throws IOException { String data = "Subject: test\r\n\r\ndata\r"; String expected = data + "\n"; checkRead(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), expected); checkReadViaArray(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), expected); }
@Test public void testCRPresent() throws IOException { String data = "Subject: test\r\n\r\ndata\r"; String expected = data + "\n"; checkRead(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), expected); checkReadViaArray(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), expected); }
@Test public void testNonPresent() throws IOException { String data = "Subject: test\r\n\r\ndata"; String expected = data + "\r\n"; checkRead(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), expected); checkReadViaArray(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), expected); }
@Test public void testCRLFPresent() throws IOException { String data = "Subject: test\r\n\r\ndata\r\n"; checkRead(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), data); checkReadViaArray(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), data); }
@Test public void testNonPresent() throws IOException { String data = "Subject: test\r\n\r\ndata"; String expected = data + "\r\n"; checkRead(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), expected); checkReadViaArray(new CRLFTerminatedInputStream(new ByteArrayInputStream(data.getBytes())), expected); }
if (deletedUidList.contains(uid) == false) { InputStream message = new CountingBodyInputStream(new ExtraDotInputStream(new CRLFTerminatedInputStream(session.getUserMailbox().getMessage(uid))), lines); return new POP3StreamResponse(POP3Response.OK_RESPONSE, "Message follows", message);
InputStream in = new CRLFTerminatedInputStream(new ExtraDotInputStream(content)); response = new POP3StreamResponse(POP3Response.OK_RESPONSE, "Message follows", in); return response;