Code example for PipedInputStream

0
public class TestSerializationUtils { 
    @Test 
    public void writeAndReadWorks() throws Exception { 
        String obj = "foobar"; 
        PipedOutputStream pipeOut = new PipedOutputStream(); 
        PipedInputStream pipeIn = new PipedInputStream(pipeOut); 
        SerializationUtils.writeToStream(pipeOut, obj); 
        assertEquals(obj, SerializationUtils.readFromStream(pipeIn)); 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java