Code example for FileChannel

Methods: isOpen

0
    public long getCurrentOffset() { 
        return offset;
    } 
 
    public boolean hasNextChunk() throws Exception { 
        return offset < endOffset && in.isOpen();
    } 
 
    public boolean isEndOfInput() throws Exception { 
        return !hasNextChunk(); 
    } 
 
    public void close() throws Exception { 
        in.close();
    } 
 
    public Object nextChunk() throws Exception {
        long offset = this.offset;
        if (offset >= endOffset) {
            return null; 
        }