:  Cowj GWT library

Cowj GWT library

bending GWT to breaking point and beyond

Published: 2016 November 3

A while back I was working on a project using GWT, and in the process accumulated a set of libraries. The project went nowhere, but the libraries might be useful to someone, so I'm making them available here.

Cowj contains:

  • (InputStreams, OutputStreams, Readers, Writers, Files)
  • java.nio (Buffers)
  • java.nio.charset (Character set conversion, although the set of supported encodings is pretty slim as they have to be written manually. Currently this is ASCII, UTF-8, CP1252, ISO-8859-1 and ISO-8859-15.)
  • (All the abstract channel stuff, plus FileChannel)
  • (Complete, courtesy of JazzLib)
  • org.apache.commons.codec (Complete)
  • org.apache.commons.collections.primitives (Complete)
  • org.apache.james.mime4j (Most of it, although I did this before I had File so all the File support has been removed)

...and a few other bits and pieces. It's all very patchy and I've had tinker with pretty much all of it to make it work, but there's enough functionality there to make porting traditional Java software vastly easier.

Cowj's File support is based on a very simple in-memory file system which has no directories and no persistence. It's good enough to create temporary files and then use them later.

You also get:

  • Jagg, a pure-Java port of the Antigrain Geometry lightweight renderer. This is a software canvas implementation that will draw closed polygons of arbitrary complexity into an off-screen buffer, with full alpha blending and subpixel rendering. I've also glued on Adam Doppelt's GIFEncoder so the result can be turned into a data: URL for display. (Although this only works with images with up to 256 colours.)

None of it's at all documented, but it's all modular and should be easy enough to work. And best of all, it's all available under a rather complex set of compatible licenses; see inside the package for details, but the bulk of it is released under the terms of the Apache 2.0 license.