summaryrefslogtreecommitdiff
path: root/java
AgeCommit message (Collapse)AuthorFilesLines
2015-12-02Java builder now checks if buffer was finished upon access.Wouter van Oortmerssen1-12/+34
Also checks for nesting of objects in vector construction. This avoids common errors in FlatBuffer construction. Change-Id: I5507c5d767684e20e94883a92448f05acefba4d6 Tested: on Linux.
2015-05-20Java: Allow access to the underlying ByteBuffer from a table.Wouter van Oortmerssen1-0/+2
Change-Id: Id268e35de207c25c809a09071b81eea873c9123e Tested: on Linux.
2015-05-11Merge pull request #189 from pjulien/188gwvo1-1/+1
Issue #188
2015-05-11Merge pull request #192 from Jiboo/fix190gwvo1-0/+7
Added a default constructor for Java's FlatBufferBuilder.
2015-05-11Added a default costructor for Java's FlatBufferBuilder.Jean-Baptiste "Jiboo" Lepesme1-0/+7
Default's size of 1024b like in cpp. Fixes #190.
2015-05-09Issue #188pjulien1-1/+1
When accessing the array directly of a byte buffer, need to offset by ``arrayOffset``
2015-05-08set version for next dev cyclepjulien1-1/+1
Change-Id: I17a7896e257c0ab7e4cd1b22c928d4cee21fbf11
2015-05-08Initially discussed in #178.pjulien1-0/+15
Allows adding an already encoded UTF-8 string directly without having to convert to a ``String`` first. Change-Id: I23f9c738eec18fd35f4c14f58dbd0f6cf0970dc7
2015-02-04Issue #136pjulien1-9/+9
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-02Added force-defaults to Java bindingsFlorian Enner1-8/+22
Change-Id: I62d10b639112788be3b0f670280bd50ef9fcf094
2015-02-02Added FlatBufferBuilder reuseFlorian Enner1-0/+19
init resets internal variables, but keeps memory that has been allocated for temporary storage Change-Id: If2aa7d27de3c2717cf4c82b1e4e4b6732e495cea
2015-01-26Fix for previous Java commit.Wouter van Oortmerssen1-2/+5
optimization would cause vtable fields from previous tables to be written. Bug: 19046968 Change-Id: I781f7bcbceeaec0b499d4f1e4e5e8a1e750e0707 Tested: on Linux.
2015-01-26Reducing garbage produced by Java serializer.Wouter van Oortmerssen1-9/+12
startObject() now only allocates a new vtable array when it needs to grow. Tested: on Linux. Change-Id: Idd041605afcb9487a34d63bda067172d797f437a
2015-01-26PR for issue #130. Improves the javadoc of ``FlatBufferBuilder``pjulien1-25/+186
and marks ``dataStart`` deprecated. Change-Id: I48409e20948117c5cf17a1bfabecf64b033eab27
2015-01-26Support for booleans in the Java/C# APIWouter van Oortmerssen1-19/+22
Change-Id: I72e92183a7b5f4145ea51fcec29257dc9553a461
2015-01-16Add a simple Maven file modeled afterPatrick Julien1-0/+84
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-16Reuse the same charset instancePatrick Julien1-3/+2
Change-Id: I58b411a2c0f1ee6b856d5b1eaa42787036da1384
2014-09-22Support for required fields.Wouter van Oortmerssen1-0/+11
Change-Id: I560c7ca11b3d665eecafb528f3737b7e139ca9b0 Tested: on Linux and Windows.
2014-09-15Prepended com.google to the Java namespace.Wouter van Oortmerssen4-6/+6
Bug: 16507831 Change-Id: I5beee18f63f174e425dc1ab395807b578d5f9477 Tested: on Linux.
2014-09-15Added accessor in Java to get vectors as ByteBuffers.Wouter van Oortmerssen2-8/+36
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-15Removed the use of b.array() to support DirectBuffers.bml132-19/+24
Also removed Table extend Constants. Change-Id: I1770b613c58094fa572a3b26a31f01bd5fb8fdbf
2014-09-05Made FlatBufferBuilder.java require ByteBuffers that have an array.Wouter van Oortmerssen1-8/+10
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-05Implemented the file identifier functionality for Java.Wouter van Oortmerssen3-8/+50
Also fixed flatc not outputting these identifiers for files compiled on the command-line. Bug: 16983987 Change-Id: I8b714cfea3a8e144fa52133f62b2f7eda6eb044a Tested: on Linux
2014-09-03Made reading read-only ByteBuffers work.Wouter van Oortmerssen2-2/+20
Also added new constructor that allows ByteBuffer reuse. Change-Id: I9c20ea96c67533066461f4e23b0d03b9b47cd068 Tested: on OS X.
2014-08-13Fixed possible alignment issue in Javav1.0.1Wouter van Oortmerssen1-2/+3
Tested: on Linux Change-Id: Ie80aa19ed13ac4fa15cd3fd768f1a35526bdc607
2014-08-12Fix vector of strings for JavaBob Potter1-1/+0
Change-Id: If032b450230b15224b2661836c8a740398d207c5
2014-07-02Fixed a bugs in the Java runtime that could cause an index out of bounds ↵Wouter van Oortmerssen1-7/+13
exception. Tested: on Windows. Change-Id: I0d4cdafc21690eb9a509ba31f21e80dacfb602ff
2014-06-17Fixed a bug in the Java code generation that would generate the wrong ↵Wouter van Oortmerssen1-1/+3
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-10Initial commit of the FlatBuffers code.Wouter van Oortmerssen3-0/+342
Change-Id: I4c9f0f722490b374257adb3fec63e44ae93da920 Tested: using VS2010 / Xcode / gcc on Linux.