Overview

java.nio, java.nio.channels and java.nio.channels.spi.

Status

The initial contribution is compliant with J2SE 1.4.2 spec, and the coverage is not complete.

Below are details about the what's missing and current status. Because Harmony's objective is JSE 5.0 compliance, and JSE 5's update on this component is not so much, so the current update is aiming at JSE 5 directly. Richard Liang and Paulex Yang is working on this component.

J2SE 1.4.2

The current codes cover part of J2SE 1.4.2 API. Current update work is directly aiming at 5.0.

Java SE 5.0

java.nio

Method signature non-compliance

Because the buffers' implementation were located in another internal package, several API classes' method signatures were not compliant with spec. The refactoring is needed to fix this.

Status: API - done, test - done

References: http://issues.apache.org/jira/browse/HARMONY-26

New interfaces of JSE 5.0

CharBuffer implements two new interfaces, java.lang.Appendable and java.lang.Readable, which are both added by JSE 5.0.

Status: API - done, test - done

References: http://issues.apache.org/jira/browse/HARMONY-36

Performance enhancement for buffers' bulk get/put

Buffers' bulk get/put operation's performance can be improved, because they actually get/put cached elements one by one in a loop. The enhancement leveraged native support to implement bulk get/put directly.

Status: done

References: http://issues.apache.org/jira/browse/HARMONY-43

java.nio.channels

Network related channels not implementd

The network related channels, SocketChannel, ServerSocketChannel and DatagramSocketChannel were not implemented.

Status: API - done, test - done

References: http://issues.apache.org/jira/browse/HARMONY-27

FileChannel not fully implemented

Several functions of FileChannel, includes memory map, channel transfer, vector IO were not implemented.

Status: API - in progress, test - done.

References: http://issues.apache.org/jira/browse/HARMONY-42

TO DO: The current port library provided memory map function, but it doesn't meet the needs of FileChannel, so that the update to portlib is required to fully implement memory map. This also affects channel transfer, because in some case the transfer is implemented based on mmap.

Channels, Selector, and Pipe not implemented

There are only stubs for these classes. This issue is tightly coupled with java.nio.channels.spi package.

Status: API - in progress, test - in progress.

References: http://issues.apache.org/jira/browse/HARMONY-41

New interface of JSE 5

Interface Channel extends new interface Closeable from JSE 5 sepc.

Status: not start yet.

java.nio.channels.spi

All classes are not fully implemented

There are only stubs for these classes.

Status: API - in progess, test - in progress.

References: http://issues.apache.org/jira/browse/HARMONY-41

Asynchronize interruption of I/O and selection operation are not implemented

The asynchronize interruption implementation needs some contract with java.lang.Thread implementation, because the Thread object must be aware of what kind of operation it is blocking on, so that it can decide what to do when interrupted. This contract may need update of VMI.

Status: not start yet.

New method of JSE 5

From JSE 5 spec, SelectorProvider adds one method - inheritedChannel()

Status: not start yet.

other issues

Move platform codes to LUNI

The com.ibm.platform and com.ibm.platform.struct is for the purpose of commonly used platform operation, so it should locate in some very basic component like LUNI. One example is the wrapping code of native file and network I/O operation, which is used by luni(java.io and java.net) as well as nio component.

Status: API - done, test - more regression test may be necessary

References: http://issues.apache.org/jira/browse/HARMONY-92

Back to component_development_status

  • No labels