Commit Graph

23 Commits

Author SHA1 Message Date
pjulien f7d24f60a2 set version for next dev cycle
Change-Id: I17a7896e257c0ab7e4cd1b22c928d4cee21fbf11
2015-05-08 16:21:54 -07:00
pjulien e5a1a3129d Initially discussed in #178.
Allows adding an already encoded UTF-8 string directly without
having to convert to a ``String`` first.

Change-Id: I23f9c738eec18fd35f4c14f58dbd0f6cf0970dc7
2015-05-08 16:21:54 -07:00
pjulien 4d3db99283 Issue #136
The satellite data of the ``ByteBuffer`` cannot be modified in
any way and stay thread safe in the presence of concurrent readers.

This implementation is simple and does introduce an allocation, however
without it multiple readers will quickly and continuously encounter
``IndexOutOfBoundsException`` exceptions.

An alternative, but possibly more controversial, implementation would
be to use ``Unsafe``.  Using ``Unsafe``, it's possible to do an
array copy with a provided buffer index.

Change-Id: I851d4034e753b3be2931ee2249ec2c82dde43135
2015-02-04 13:53:02 -08:00
Florian Enner 72b9501e69 Added force-defaults to Java bindings
Change-Id: I62d10b639112788be3b0f670280bd50ef9fcf094
2015-02-02 14:04:22 -08:00
Florian Enner 9c169083ad Added FlatBufferBuilder reuse
init resets internal variables, but keeps memory that has been allocated
for temporary storage

Change-Id: If2aa7d27de3c2717cf4c82b1e4e4b6732e495cea
2015-02-02 14:02:22 -08:00
Wouter van Oortmerssen 79c2d80ed4 Fix for previous Java commit.
optimization would cause vtable fields from previous tables to be written.

Bug: 19046968
Change-Id: I781f7bcbceeaec0b499d4f1e4e5e8a1e750e0707
Tested: on Linux.
2015-01-26 14:12:20 -08:00
Wouter van Oortmerssen cf7135ff58 Reducing garbage produced by Java serializer.
startObject() now only allocates a new vtable array when it needs to grow.

Tested: on Linux.

Change-Id: Idd041605afcb9487a34d63bda067172d797f437a
2015-01-26 13:35:20 -08:00
pjulien 2b01247b30 PR for issue #130. Improves the javadoc of ``FlatBufferBuilder``
and marks ``dataStart`` deprecated.

Change-Id: I48409e20948117c5cf17a1bfabecf64b033eab27
2015-01-26 13:08:44 -08:00
Wouter van Oortmerssen 4fb5a764df Support for booleans in the Java/C# API
Change-Id: I72e92183a7b5f4145ea51fcec29257dc9553a461
2015-01-26 13:08:44 -08:00
Patrick Julien 1263e9788e Add a simple Maven file modeled after
https://github.com/google/protobuf/blob/master/java/pom.xml

This isn't good enough to publish to Maven Central but will at
least allow users to publish to their local maven repository
using 'mvn install'

Change-Id: I91ea146cf7c5263fcf5d9823f70bb1ef0158f9a6
Tested: 'mvn install' runs succesfully and produces a .jar
2015-01-16 11:39:23 -08:00
Patrick Julien c95ad9cc55 Reuse the same charset instance
Change-Id: I58b411a2c0f1ee6b856d5b1eaa42787036da1384
2015-01-16 11:05:58 -08:00
Wouter van Oortmerssen 517c964fe2 Support for required fields.
Change-Id: I560c7ca11b3d665eecafb528f3737b7e139ca9b0
Tested: on Linux and Windows.
2014-09-22 15:53:19 -07:00
Wouter van Oortmerssen c01c77a7f2 Prepended com.google to the Java namespace.
Bug: 16507831
Change-Id: I5beee18f63f174e425dc1ab395807b578d5f9477
Tested: on Linux.
2014-09-15 17:45:15 -07:00
Wouter van Oortmerssen 858e9961e2 Added accessor in Java to get vectors as ByteBuffers.
Also cleaned up ByteBuffer usage in general: ByteBuffer.position
now universally indicates the start of a ByteBuffer.

Change-Id: Ic4bfb98f9df9501b8fc82de2c45db7d7311135ac
Tested: on Linux.
2014-09-15 16:19:26 -07:00
bml13 e14bc1d9ac Removed the use of b.array() to support DirectBuffers.
Also removed Table extend Constants.

Change-Id: I1770b613c58094fa572a3b26a31f01bd5fb8fdbf
2014-09-15 16:13:49 -07:00
Wouter van Oortmerssen 354aad4bc5 Made FlatBufferBuilder.java require ByteBuffers that have an array.
Readonly ByteBuffers and Direct ByteBuffers don't have a backing
array, and thus can't be used for writing FlatBuffers (though
they are fine for reading).

Change-Id: I4d7b9cc222b96161d0f8e92f34588bd3e0e38034
Tested: on Linux.
2014-09-05 13:48:02 -07:00
Wouter van Oortmerssen 09a2999c66 Implemented the file identifier functionality for Java.
Also fixed flatc not outputting these identifiers for files
compiled on the command-line.

Bug: 16983987
Change-Id: I8b714cfea3a8e144fa52133f62b2f7eda6eb044a
Tested: on Linux
2014-09-05 10:54:52 -07:00
Wouter van Oortmerssen 4507594812 Made reading read-only ByteBuffers work.
Also added new constructor that allows ByteBuffer reuse.

Change-Id: I9c20ea96c67533066461f4e23b0d03b9b47cd068
Tested: on OS X.
2014-09-03 11:03:02 -07:00
Wouter van Oortmerssen cdb0dca39d Fixed possible alignment issue in Java
Tested: on Linux

Change-Id: Ie80aa19ed13ac4fa15cd3fd768f1a35526bdc607
2014-08-13 11:50:54 -07:00
Bob Potter 39d4b7e2bf Fix vector of strings for Java
Change-Id: If032b450230b15224b2661836c8a740398d207c5
2014-08-12 15:12:51 -07:00
Wouter van Oortmerssen 350011f581 Fixed a bugs in the Java runtime that could cause an index out of bounds exception.
Tested: on Windows.

Change-Id: I0d4cdafc21690eb9a509ba31f21e80dacfb602ff
2014-07-02 14:39:58 -07:00
Wouter van Oortmerssen 41a6d35e74 Fixed a bug in the Java code generation that would generate the wrong identifier in some cases.
Also added a safety check for buffers growing past 2 gigabytes.

Change-Id: I2bca7159f606cf1c08c4391e88ef9b4c8363be06
Tested: With the Java sdk.
2014-06-17 17:34:03 -07:00
Wouter van Oortmerssen 26a30738a4 Initial commit of the FlatBuffers code.
Change-Id: I4c9f0f722490b374257adb3fec63e44ae93da920
Tested: using VS2010 / Xcode / gcc on Linux.
2014-06-10 13:53:28 -07:00