Code example for PipedOutputStream

Methods: closeflushwrite

0
   } 
    
   @Test 
   public void readAfterClose() throws IOException 
   { 
      m_output.write(10);
      m_output.flush();
       
      m_input.available();
       
      m_output.close();
 
      Assert.assertEquals(10, m_input.peek());
      Assert.assertEquals(10, m_input.read());
      Assert.assertEquals(-1, m_input.peek());
      Assert.assertEquals(-1, m_input.read());
   } 
 
   @Test 
   public void readBufferAfterClose() throws IOException 
Experience pair programming with AI  Get Codota for Java