public int read()

in src/main/java/com/pastdev/jsch/nio/file/UnixSshSeekableByteChannel.java [94:111]


    public int read( ByteBuffer bytes ) throws IOException {
        if ( !readable ) {
            throw new NonReadableChannelException();
        }
        if ( position >= size ) {
            return -1;
        }

        int read = provider.read( path, position, bytes );
        position += read;
        if ( position > size ) {
            // sucks, means somebody else is also writing this file, bad things
            // are gonna happen here...
            size = position;
        }

        return read;
    }