Code example for CountingOutputStream

0
    private final LittleEndianDataOutputStream dataOutputStream;
 
    @SuppressWarnings("IOResourceOpenedButNotSafelyClosed") 
    public OutputStreamSliceOutput(OutputStream outputStream)
    { 
        countingOutputStream = new CountingOutputStream(outputStream);
        dataOutputStream = new LittleEndianDataOutputStream(countingOutputStream);
    } 
 
    @Override 
    public void flush() 
            throws IOExceptioncountingOutputStream.flush();
    } 
 
    @Override 
    public void close() 
            throws IOException
Contextual code suggestions in your IDE  Get Codota for Java