JDK-4646618 : Please permit Buffer.position(long newPosition) instead of int
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-03-04
  • Updated: 2002-03-15
  • Resolved: 2002-03-15
Related Reports
Duplicate :  
Description

Name: gm110360			Date: 03/04/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)


FULL OPERATING SYSTEM VERSION :
java 1.4.0-b92

EXTRA RELEVANT SYSTEM CONFIGURATION :
We have very large pdf files and in order to handle these
files nio package needs to permit long values instead of
int.  Right now I am typecasting the long value to int and
run the risk of truncation.

Buffer Buffer::limit(long newLimit)
Buffer Buffer::position(long newPosition)

Also return value for other methods needs to be a long:
long Buffer::limit()
long Buffer::position()
long Buffer::remaining()
long Buffer::capacity()


A DESCRIPTION OF THE PROBLEM :
Please modify the signatures for above mentioned methods in
java.nio.Buffer class to permit long values instead of int
values.

This bug can be reproduced always.
(Review ID: 143675) 
======================================================================