Skip navigation links
TrueCommons 2.3.3

@Nonnull @ParametersAreNonnullByDefault

Package net.java.truecommons.io

Provides common I/O components.

See: Description

Package net.java.truecommons.io Description

Provides common I/O components.

Note that some decorator classes for seekable byte channels implement their own virtual position. If you would like to use a decorated seekable byte channel again after you have finished using such a decorating seekable byte channel, then you need to synchronize their positions using the following idiom:

     SeekableByteChannel sbc = ...
     try {
         SeekableInputChannel bic = new BufferedInputChannel(sbc);
         try {
             // Do any input on bic here...
             bic.seek(1);
         } finally {
             // Synchronize the positions.
             sbc.position(bic.position());
         }
         // This assertion would fail if we hadn't done the position
         // synchronization!
         assert sbc.position() == 1;
     } finally {
         sbc.close();
     }
 
Author:
Christian Schlichtherle
Skip navigation links
TrueCommons 2.3.3

Copyright © 2012–2017 Schlichtherle IT Services. All rights reserved.