Package org.apache.derby.iapi.services.io

Examples of org.apache.derby.iapi.services.io.ArrayInputStream.skipBytes()


    public void testSkipBytesIntMaxValue() throws IOException {
        ArrayInputStream ais = new ArrayInputStream(new byte[1000]);
        assertEquals(1000, ais.skipBytes(Integer.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
        ais.setPosition(1);
        assertEquals(999, ais.skipBytes(Integer.MAX_VALUE));
        assertEquals(1000, ais.getPosition());
    }

    /**
     * Test that skip() returns 0 when the argument is negative (DERBY-3739).
View Full Code Here


     * Test that skipBytes() returns 0 when the argument is negative
     * (DERBY-3739).
     */
    public void testSkipBytesNegative() throws IOException {
        ArrayInputStream ais = new ArrayInputStream(new byte[1000]);
        assertEquals(0, ais.skipBytes(-1));
    }
}
View Full Code Here

                                inUserCode = lrdi;
                                sColumn.readExternalFromArray(lrdi);
                                inUserCode = null;
                                int unread = lrdi.clearLimit();
                                if (unread != 0)
                                    lrdi.skipBytes(unread);
                            }
                            else
                            {
                                // fetched column is a Storable long column.
View Full Code Here

                        // RESOLVE (no non-storables?)
                        row[colid] = (Object) lrdi.readObject();
                        inUserCode = null;
                        int unread = lrdi.clearLimit();
                        if (unread != 0)
                            lrdi.skipBytes(unread);
                    }

                }
                else
                {
View Full Code Here

                                inUserCode = lrdi;
                                sColumn.readExternalFromArray(lrdi);
                                inUserCode = null;
                                int unread = lrdi.clearLimit();
                                if (unread != 0)
                                    lrdi.skipBytes(unread);
                            }
                            else
                            {
                                // fetched column is a Storable long column.
View Full Code Here

                        // RESOLVE (no non-storables?)
                        row[colid] = (Object) lrdi.readObject();
                        inUserCode = null;
                        int unread = lrdi.clearLimit();
                        if (unread != 0)
                            lrdi.skipBytes(unread);
                    }

                }
                else
                {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.