Package org.uberfire.java.nio.channels

Examples of org.uberfire.java.nio.channels.SeekableByteChannel.truncate()


        assertEquals( "ONTENT\n?", new String( buffer.array() ) );

        assertEquals( 9L, sbc.position() );

        sbc.position( 0L );
        sbc.truncate( 2L );
        ByteBuffer buffer3 = ByteBuffer.allocate( 2 );
        sbc.read( buffer3 );
        assertEquals( "CO", new String( buffer3.array() ) );

        sbc.close();
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.