Skip to main content

[xadisk~svn:527] Changes for JIRA issue #128.

  • From: nitin_verma@...
  • To: commits@...
  • Subject: [xadisk~svn:527] Changes for JIRA issue #128.
  • Date: Fri, 9 Aug 2013 17:33:23 +0000

Project:    xadisk
Repository: svn
Revision:   527
Author:     nitin_verma
Date:       2013-08-09 17:33:22 UTC
Link:       

Log Message:
------------
Changes for JIRA issue #128.


Revisions:
----------
527


Modified Paths:
---------------
trunk/src/org/xadisk/filesystem/virtual/NativeXAFileInputStream.java


Diffs:
------
Index: trunk/src/org/xadisk/filesystem/virtual/NativeXAFileInputStream.java
===================================================================
--- trunk/src/org/xadisk/filesystem/virtual/NativeXAFileInputStream.java      
  (revision 526)
+++ trunk/src/org/xadisk/filesystem/virtual/NativeXAFileInputStream.java      
  (revision 527)
@@ -172,7 +172,11 @@
                 throw new IllegalArgumentException("Argument should be a 
non-negative integer.");
             }
             long filesize = vvf.getLength();
-            long readPositionAfterSkip = (position - byteBuffer.remaining()) 
+ n;
+            int bufferedBytesRemaining = 0;
+            if(filledAtleastOnce) {
+                bufferedBytesRemaining = byteBuffer.remaining();
+            }
+            long readPositionAfterSkip = (position - bufferedBytesRemaining) 
+ n;
             if (readPositionAfterSkip > filesize) {
                 n = n - (readPositionAfterSkip - filesize);
                 readPositionAfterSkip = filesize;





[xadisk~svn:527] Changes for JIRA issue #128.

nitin_verma 08/09/2013
 
 
Close
loading
Please Confirm
Close