@Test public void writeTest() throws Exception { LazyImmutableRep rep = new LazyImmutableRep(text, in("bar")); ByteArrayOutputStream out1 = new ByteArrayOutputStream(); ByteArrayOutputStream out2 = new ByteArrayOutputStream(); rep.write(out1); rep.write(out2); assertEquals("bar", string(out1.toByteArray())); assertEquals("bar", string(out2.toByteArray())); }
@Override public void write(OutputStream out) { self.write(out); }
LazyImmutableRep implements Representation { @Override public void write(OutputStream out) { self.write(out); } }
LazyImmutableRep implements Representation { @Override public void write(OutputStream out) { self.write(out); } LazyImmutableRep(String contentType, InputStream data); }
LazyImmutableRep implements Representation { @Override public void write(OutputStream out) { self.write(out); } LazyImmutableRep(String contentType, InputStream data); byte[] head(int n); byte[] get(); @Override String contentType(); @Override void write(OutputStream out); @Override String show(); @Override boolean eq(Representation that); }
LazyImmutableRep implements Representation { @Override public void write(OutputStream out) { self.write(out); } LazyImmutableRep(String contentType, InputStream data); byte[] head(int n); byte[] get(); @Override String contentType(); @Override void write(OutputStream out); @Override String show(); @Override boolean eq(Representation that);  }