Code example for FileDescriptor

0
 
    /** 
     * Open an InputStream based on the handle. 
     */ 
    protected ProcessInputStream(long handle) {
        this.fd = new java.io.FileDescriptor();
        setFDImpl(fd, handle);
        this.handle = handle;
    } 
 
    @Override 
    public int available() throws IOException { 
        synchronized (this) {
            if (handle == -1) {
                return -1; 
            } 
            return availableImpl(); 
        } 
    } 
 
    /**