Code example for FileChannel

Methods: position

0
 
    private long getCurrentOffset()  
    { 
        try { 
            //current real position minus approximate buffer length 
            return Math.max(currentChannel.position() - (long)(1<<14), 0);
        } catch (Exception e) {
            e.printStackTrace();
        } 
        return -1; 
    } 
 
    @Override 
	public void startElement(String uri, String local_name, String raw_name, Attributes amap) throws SAXException 
    { 
        raw_name = raw_name.toLowerCase();
        elementsStack.push(raw_name.toLowerCase());
        nodeBuffer = "";
        if (raw_name.equals("page")) 
	{ 
            isInPage = true;