Java Code Examples for java.io.ObjectInput#skip()

The following examples show how to use java.io.ObjectInput#skip() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NbObjectInputStream.java    From netbeans with Apache License 2.0 2 votes vote down vote up
/** Skips an object from the given object input without loading it.
* The object had to be saved by the {@link NbObjectOutputStream#writeSafely} method.
*
* @param oi object input
* @exception IOException if an I/O error occurred
*/
public static void skipSafely(ObjectInput oi) throws IOException {
    int size = oi.readInt();
    oi.skip(size);
}