mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Added new constants
Add new constants in Constants.java All single ints int FlatBufferBuilder.java were replaced by constants from Constants.java
This commit is contained in:
@@ -23,10 +23,18 @@ package com.google.flatbuffers;
|
||||
*/
|
||||
public class Constants {
|
||||
// Java doesn't seem to have these.
|
||||
/** The number of bytes in an `byte`. */
|
||||
static final int SIZEOF_BYTE = 1;
|
||||
/** The number of bytes in a `short`. */
|
||||
static final int SIZEOF_SHORT = 2;
|
||||
/** The number of bytes in an `int`. */
|
||||
static final int SIZEOF_INT = 4;
|
||||
/** The number of bytes in an `float`. */
|
||||
static final int SIZEOF_FLOAT = 4;
|
||||
/** The number of bytes in an `long`. */
|
||||
static final int SIZEOF_LONG = 8;
|
||||
/** The number of bytes in an `double`. */
|
||||
static final int SIZEOF_DOUBLE = 4;
|
||||
/** The number of bytes in a file identifier. */
|
||||
static final int FILE_IDENTIFIER_LENGTH = 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user