Code example for Closer

Methods: register

0
      super(content);
   } 
 
   @Override 
   public InputStream openStream() throws IOException {
      return closer.register(content.openStream());
   } 
 
   @Override 
   public boolean isRepeatable() { 
      return true; 
   } 
 
   /** 
    * if we created the stream, then it is already consumed on close. 
    */ 
   @Override 
   public void release() { 
      closeQuietly(closer);
   } 
Experience pair programming with AI  Get Codota for Java