Skip to content

J2cl/GWT support for java.nio packages, forked from the PlayN project

License

Notifications You must be signed in to change notification settings

Vertispan/gwt-nio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GWT/J2CL emulation for java.nio packages

This project provides emulation for the java.nio packages, forked from the PlayN project. There is also a utility class included to allow wrapping and unwrapping JS Typed Arrays.

To use in GWT2, depend on this Jar in your project, and add this to your .gwt.xml module file:

<inherits name="org.gwtproject.nio.GwtNioSupport" />

The org.gwtproject.nio.TypedArrayHelper class contains to helper methods, to turn java.nio.ByteBuffers into JavaScript ArrayBuffer (technically ArrayBufferView, but you can get an ArrayBuffer from there) and back again. For legacy reasons, HasArrayBufferView also still exists from the original PlayN project, and ByteBuffer still implements it, but using the TypedArrayHelper is encouraged for both directions of wrapping and unwrapping.

The interface TypedArrayHelper.Wrapper still exists, but its use is discouraged.

Take care in forking this repository, we may rewrite history to remove unrelated PlayN commits.

About

J2cl/GWT support for java.nio packages, forked from the PlayN project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages