Fixed offset computation in BufferCache read/write calls

git-svn-id: https://hyracks.googlecode.com/svn/trunk/hyracks@163 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/buffercache/BufferCache.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/buffercache/BufferCache.java
index 7a866c4..3dcf8dc 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/buffercache/BufferCache.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/buffercache/BufferCache.java
@@ -272,7 +272,7 @@
         FileInfo fInfo = fileManager.getFileInfo(FileInfo.getFileId(cPage.dpid));
         try {
             cPage.buffer.clear();
-            fInfo.getFileChannel().read(cPage.buffer, FileInfo.getPageId(cPage.dpid) * pageSize);
+            fInfo.getFileChannel().read(cPage.buffer, (long) FileInfo.getPageId(cPage.dpid) * pageSize);
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
@@ -283,7 +283,7 @@
         try {
             cPage.buffer.position(0);
             cPage.buffer.limit(pageSize);
-            fInfo.getFileChannel().write(cPage.buffer, FileInfo.getPageId(cPage.dpid) * pageSize);
+            fInfo.getFileChannel().write(cPage.buffer, (long) FileInfo.getPageId(cPage.dpid) * pageSize);
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }