IO/NIO with Streams

Mohan Radhakrishnan radhakrishnan.mohan at gmail.com
Sun Feb 9 06:20:21 PST 2014


Hi,
       I have seen the File API being used with maps and filters. Is there
a way to stream from a NIO channel like this into a ByteBuffer with
filtering capabilities ?


try(
            SeekableByteChannel skbc = Files.newByteChannel(p,

EnumSet.of(StandardOpenOption.READ))) {

            while( skbc.read( b ) > 0){

            }

        } catch (IOException e) {
            e.printStackTrace();
        }

Thanks.


More information about the lambda-dev mailing list