@Test public void lastLine() throws IOException { LineOutputStream<LastLineProcessor> lpos = LineOutputStream.lastLine(); lpos.write("hello\r\n".getBytes(StandardCharsets.UTF_8)); assertThat(lpos.processor().lastLine(), is("hello")); lpos.write("world\r\n".getBytes(StandardCharsets.UTF_8)); assertThat(lpos.processor().lastLine(), is("world")); }
static public LineOutputStream<LastLineProcessor> lastLine() { return lastLine(StandardCharsets.UTF_8); }
LineOutputStream extends OutputStream { static public LineOutputStream<LastLineProcessor> lastLine() { return lastLine(StandardCharsets.UTF_8); } }
LineOutputStream extends OutputStream { static public LineOutputStream<LastLineProcessor> lastLine() { return lastLine(StandardCharsets.UTF_8); } LineOutputStream(P processor);  LineOutputStream(P processor, Charset charset); }
LineOutputStream extends OutputStream { static public LineOutputStream<LastLineProcessor> lastLine() { return lastLine(StandardCharsets.UTF_8); } LineOutputStream(P processor);  LineOutputStream(P processor, Charset charset); static LineOutputStream<BufferingProcessor> buffering(); static LineOutputStream<BufferingProcessor> buffering(Charset charset); static LineOutputStream<LastLineProcessor> lastLine(); static LineOutputStream<LastLineProcessor> lastLine(Charset charset); P processor(); void processor(P processor); @Override void close(); @Override void flush(); @Override void write(byte[] buffer, int offset, int length); @Override void write(byte[] b); @Override void write(int b); }
LineOutputStream extends OutputStream { static public LineOutputStream<LastLineProcessor> lastLine() { return lastLine(StandardCharsets.UTF_8); } LineOutputStream(P processor);  LineOutputStream(P processor, Charset charset); static LineOutputStream<BufferingProcessor> buffering(); static LineOutputStream<BufferingProcessor> buffering(Charset charset); static LineOutputStream<LastLineProcessor> lastLine(); static LineOutputStream<LastLineProcessor> lastLine(Charset charset); P processor(); void processor(P processor); @Override void close(); @Override void flush(); @Override void write(byte[] buffer, int offset, int length); @Override void write(byte[] b); @Override void write(int b);  }