Harmony
  1. Harmony
  2. HARMONY-26

The API of buffer classes in java.nio are not compliant with the specification of Java 5.0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None

      Description

      1. java.nio.CharBuffer
      1.1) java.nio.CharBuffer needs to implement two new interface java.lang.Appendable and java.lang.Readable
      1.2) The following methods should NOT be "protected":
      protected CharBuffer(int capacity)
      protected abstract char[] protectedArray();
      protected abstract int protectedArrayOffset();
      protected abstract boolean protectedHasArray();

      1.3) The following method should be "final":
      public CharBuffer put(char[] src)

      2. java.nio.Buffer
      2.1) The following fields should NOT be "protected":
      int UNSET_MARK
      int capacity
      int limit
      int mark should
      int position
      2.3) The following method should NOT be "protected":
      protected Buffer(int capacity)

      3. java.nio.ByteBuffer, DoubleBuffer, FloatBuffer, IntBuffer, LongBuffer, ShortBuffer
      3.1) The following field should NOT be "protected":
      com.ibm.platform.Endianness order
      3.2) The following methods should NOT be "protected":
      protected ByteBuffer(int capacity)
      protected abstract byte[] protectedArray();
      protected abstract int protectedArrayOffset();
      protected abstract boolean protectedHasArray();
      3.3) The following method should be "final":
      public ByteBuffer order(ByteOrder byteOrder)

      4. The implementation of bulk put/get methods of all the buffer classes are low-efficiency

      1. DirectBuffer.java
        1.0 kB
        Richard Liang
      2. nio-tests.jar
        31 kB
        Richard Liang

        Activity

          People

          • Assignee:
            Tim Ellison
            Reporter:
            Richard Liang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development