Package org.uberfire.java.nio.channels

Examples of org.uberfire.java.nio.channels.SeekableByteChannel


        assertFalse( ioService().exists( file ) );
        String content = "sample content";
        ioService.write( file, content );
        assertTrue( ioService().exists( file ) );

        final SeekableByteChannel sbc = ioService().newByteChannel( file, StandardOpenOption.READ );
        String readContent = readSbc( sbc );

        assertEquals( content, readContent );

        ioService().delete( file );
View Full Code Here


        ioService().deleteIfExists( file );

        assertFalse( ioService().exists( file ) );

        final SeekableByteChannel sbc = ioService().newByteChannel( file, Collections.<OpenOption>emptySet(), new FileAttribute<Object>() {
            @Override
            public String name() {
                return "custom";
            }

            @Override
            public Object value() {
                return dateValue;
            }
        } );

        sbc.write( ByteBuffer.wrap( "helloWorld!".getBytes() ) );
        sbc.close();

        assertTrue( ioService().exists( file ) );

        Map<String, Object> attrs = ioService().readAttributes( file );
View Full Code Here

TOP

Related Classes of org.uberfire.java.nio.channels.SeekableByteChannel

Copyright © 2018 www.massapicom. 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.