Code example for RandomAccessFile

Methods: getFD, seek

0
		super(blockSize);
		this.raf = raf;
	} 
 
	public InputStream doSeekLoad(long offset, int maxLength) throws IOException {
		raf.seek(offset);
		 
    	FileInputStream fis = new FileInputStream(raf.getFD());
    	 
    	if (maxLength > 0) {
    		return new LimitInputStream(fis, maxLength);
    	} else { 
    		return fis;
    	} 
    } 
		 
	public long getOffset() throws IOException 
	{ 
		if (closed) { 
			return 0; 
		}