Code example for ReadableByteChannel

Methods: read

0
        this.channel = channel;
    } 
     
    public int read( ByteBuffer dst ) throws IOException
    { 
        return lastRead = channel.read( dst );
    } 
 
    public boolean isOpen() 
    { 
        return channel.isOpen();
    } 
 
    public void close() throws IOException 
    { 
        channel.close();
    } 
 
    public int getLastRead() 
    { 
        return lastRead;