Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- AbstractReader - Class in com.bfo.json
-
The base reader class for file formats that generate a stream of
JsonStream.Eventobjects. - AbstractReader() - Constructor for class com.bfo.json.AbstractReader
- addListener(JsonListener) - Method in class com.bfo.json.Json
-
Add a
JsonListenerto this class, if it has not already been added. - after - Variable in class com.bfo.json.JsonEvent
-
The Json object after the event.
B
- before - Variable in class com.bfo.json.JsonEvent
-
The Json object before the event.
- booleanValue() - Method in class com.bfo.json.Json
-
Return the value of this node as a boolean.
- booleanValue() - Method in class com.bfo.json.JsonStream.Event
-
Return the value for
JsonStream.Event.TYPE_PRIMITIVEevents representing booleans, otherwise null - booleanValue(boolean) - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_PRIMITIVEevent with the specified boolean value - booleanValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.booleanValue()method on it, otherwise return false - bufferData(ByteBuffer) - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_BUFFER_DATAevent with the specified . - bufferData(ReadableByteChannel) - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_BUFFER_DATAevent with the specifiedReadableByteChannel. - bufferValue() - Method in class com.bfo.json.Json
-
Return the value of this node as a ByteBuffer.
- bufferValue() - Method in class com.bfo.json.JsonStream.Event
-
Return the value for
JsonStream.Event.TYPE_BUFFER_DATAevents created with a ByteBuffer, otherwise null - bufferValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.bufferValue()method on it, otherwise return null - build() - Method in class com.bfo.json.JsonBuilder
-
If the stream is complete, return the
Jsonobject created by this builder, ornullif the builder is incomplete
C
- CborReader - Class in com.bfo.json
-
A CBOR reader
- CborReader() - Constructor for class com.bfo.json.CborReader
- CborWriter - Class in com.bfo.json
-
A CBOR writer
- CborWriter() - Constructor for class com.bfo.json.CborWriter
- close() - Method in class com.bfo.json.AbstractReader
-
Close the current input
- com.bfo.json - package com.bfo.json
-
Package relating to Json, Cbor, Msgpack, and all classes relating to JWK and COSE
- COSE - Class in com.bfo.json
-
A basic COSE class.
- COSE() - Constructor for class com.bfo.json.COSE
-
Create a new, uninitialized COSE object
- COSE(Json) - Constructor for class com.bfo.json.COSE
-
Create a new COSE from one that has already been read, eg
COSE cose = new COSE(Json.readCbor(..., null)) - createArrayBuilder() - Method in class com.bfo.json.JakartaProvider
- createArrayBuilder() - Method in class com.bfo.json.JSRProvider
- createArrayBuilder(JsonArray) - Method in class com.bfo.json.JakartaProvider
- createArrayBuilder(Collection<?>) - Method in class com.bfo.json.JakartaProvider
- createArrayBuilder(Collection<?>) - Method in class com.bfo.json.JSRProvider
- createArrayBuilder(JsonArray) - Method in class com.bfo.json.JSRProvider
- createBuilderFactory(Map<String, ?>) - Method in class com.bfo.json.JakartaProvider
- createBuilderFactory(Map<String, ?>) - Method in class com.bfo.json.JSRProvider
- createDiff(JsonStructure, JsonStructure) - Method in class com.bfo.json.JakartaProvider
- createDiff(JsonStructure, JsonStructure) - Method in class com.bfo.json.JSRProvider
- createGenerator(OutputStream) - Method in class com.bfo.json.JakartaProvider
- createGenerator(OutputStream) - Method in class com.bfo.json.JSRProvider
- createGenerator(Writer) - Method in class com.bfo.json.JakartaProvider
- createGenerator(Writer) - Method in class com.bfo.json.JSRProvider
- createGeneratorFactory(Map<String, ?>) - Method in class com.bfo.json.JakartaProvider
- createGeneratorFactory(Map<String, ?>) - Method in class com.bfo.json.JSRProvider
- createMergeDiff(JsonValue, JsonValue) - Method in class com.bfo.json.JakartaProvider
- createMergeDiff(JsonValue, JsonValue) - Method in class com.bfo.json.JSRProvider
- createMergePatch(JsonValue) - Method in class com.bfo.json.JakartaProvider
- createMergePatch(JsonValue) - Method in class com.bfo.json.JSRProvider
- createObjectBuilder() - Method in class com.bfo.json.JakartaProvider
- createObjectBuilder() - Method in class com.bfo.json.JSRProvider
- createObjectBuilder(JsonObject) - Method in class com.bfo.json.JakartaProvider
- createObjectBuilder(Map<String, ?>) - Method in class com.bfo.json.JakartaProvider
- createObjectBuilder(Map<String, Object>) - Method in class com.bfo.json.JSRProvider
- createObjectBuilder(JsonObject) - Method in class com.bfo.json.JSRProvider
- createParser(InputStream) - Method in class com.bfo.json.JakartaProvider
- createParser(InputStream) - Method in class com.bfo.json.JSRProvider
- createParser(Reader) - Method in class com.bfo.json.JakartaProvider
- createParser(Reader) - Method in class com.bfo.json.JSRProvider
- createParserFactory(Map<String, ?>) - Method in class com.bfo.json.JakartaProvider
- createParserFactory(Map<String, ?>) - Method in class com.bfo.json.JSRProvider
- createPatch(JsonArray) - Method in class com.bfo.json.JakartaProvider
- createPatch(JsonArray) - Method in class com.bfo.json.JSRProvider
- createPatchBuilder() - Method in class com.bfo.json.JakartaProvider
- createPatchBuilder() - Method in class com.bfo.json.JSRProvider
- createPatchBuilder(JsonArray) - Method in class com.bfo.json.JakartaProvider
- createPatchBuilder(JsonArray) - Method in class com.bfo.json.JSRProvider
- createPointer(String) - Method in class com.bfo.json.JakartaProvider
- createPointer(String) - Method in class com.bfo.json.JSRProvider
- createReader(InputStream) - Method in class com.bfo.json.JakartaProvider
- createReader(InputStream) - Method in class com.bfo.json.JSRProvider
- createReader(Reader) - Method in class com.bfo.json.JakartaProvider
- createReader(Reader) - Method in class com.bfo.json.JSRProvider
- createReaderFactory(Map<String, ?>) - Method in class com.bfo.json.JakartaProvider
- createReaderFactory(Map<String, ?>) - Method in class com.bfo.json.JSRProvider
- createValue(double) - Method in class com.bfo.json.JakartaProvider
- createValue(double) - Method in class com.bfo.json.JSRProvider
- createValue(int) - Method in class com.bfo.json.JakartaProvider
- createValue(int) - Method in class com.bfo.json.JSRProvider
- createValue(long) - Method in class com.bfo.json.JakartaProvider
- createValue(long) - Method in class com.bfo.json.JSRProvider
- createValue(String) - Method in class com.bfo.json.JakartaProvider
- createValue(String) - Method in class com.bfo.json.JSRProvider
- createValue(BigDecimal) - Method in class com.bfo.json.JakartaProvider
- createValue(BigDecimal) - Method in class com.bfo.json.JSRProvider
- createValue(BigInteger) - Method in class com.bfo.json.JakartaProvider
- createValue(BigInteger) - Method in class com.bfo.json.JSRProvider
- createWriter(OutputStream) - Method in class com.bfo.json.JakartaProvider
- createWriter(OutputStream) - Method in class com.bfo.json.JSRProvider
- createWriter(Writer) - Method in class com.bfo.json.JakartaProvider
- createWriter(Writer) - Method in class com.bfo.json.JSRProvider
- createWriterFactory(Map<String, ?>) - Method in class com.bfo.json.JakartaProvider
- createWriterFactory(Map<String, ?>) - Method in class com.bfo.json.JSRProvider
D
- doubleValue() - Method in class com.bfo.json.Json
-
Return the value of this node as a double.
- doubleValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.doubleValue()method on it, otherwise return 0 - duplicate() - Method in class com.bfo.json.Json
-
Create and return a deep copy of this Json tree.
E
- endBuffer() - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_BUFFER_ENDevent - endList() - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_LIST_ENDevent - endMap() - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_MAP_ENDevent - endString() - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_STRING_ENDevent - equals(Object) - Method in class com.bfo.json.Json
- event(JsonStream.Event) - Method in class com.bfo.json.CborWriter
- event(JsonStream.Event) - Method in class com.bfo.json.JsonBuilder
- event(JsonStream.Event) - Method in interface com.bfo.json.JsonStream
-
Process an event.
- event(JsonStream.Event) - Method in class com.bfo.json.JsonWriter
- event(JsonStream.Event) - Method in class com.bfo.json.MsgpackWriter
F
- find(Json) - Method in class com.bfo.json.Json
-
Get the path from this node to the specified object, which should be a descendant of this node.
- floatValue() - Method in class com.bfo.json.Json
-
Return the value of this node as an float.
- floatValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.floatValue()method on it, otherwise return 0 - fromCOSEKey(Json) - Static method in class com.bfo.json.JWK
-
Convert a COSE Key (https://datatracker.ietf.org/doc/html/rfc9052#section-7) to a JWT version
- fromJson(Json) - Method in interface com.bfo.json.JsonFactory
-
Given a Json object, return a more specific type if this factory knows about it, otherwise return null
G
- get(Object) - Method in class com.bfo.json.Json
-
Return the specified child of this object, or null if no value exists at the specified key
- getAlgorithm() - Method in class com.bfo.json.JWK
-
Return the algorithm name, if set
- getAlgorithm() - Method in class com.bfo.json.JWT
-
Return the algorithm name.
- getAlgorithm(int) - Method in class com.bfo.json.COSE
-
Return the Signature algorithm used for the specified signature - 0 for the first signature, 1 for the second etc.
- getAudience() - Method in class com.bfo.json.JWT
-
Return the audience claim ("aud")
- getBufferStream() - Method in class com.bfo.json.Json
-
Return a
ReadableByteChannelthat can be used to read the buffer value from this object. - getBufferStreamLength() - Method in class com.bfo.json.Json
-
Return the number of bytes that can be read from the stream returned by
Json.getBufferStream()or -1 if it is of indeterminate length. - getByteNumber() - Method in class com.bfo.json.AbstractReader
-
Return the byte number of the input, or 0 if the input is not tracking bytes.
- getCertificates() - Method in class com.bfo.json.COSE
-
If the COSE object contains X.509 Certificates in the header, as defined by RFC9360, then return the list.
- getCertificates() - Method in class com.bfo.json.JWK
-
Return the list of X.509 certificates specified in the JWK, downloading them if required.
- getCharNumber() - Method in class com.bfo.json.AbstractReader
-
Return the character number of the input, or 0 if the input is not text-based
- getColumnNumber() - Method in class com.bfo.json.AbstractReader
-
Return the column number of the input, or 0 if the input is not text-based or is not tracking line numbers
- getDebugger(JsonStream) - Static method in interface com.bfo.json.JsonStream
-
Return a simple wrapper around the specified Stream which will log events to System.out
- getExpiry() - Method in class com.bfo.json.JWT
-
Return the expiry claim ("exp"), in seconds since the epoch.
- getExternalProtectedAttributes() - Method in class com.bfo.json.COSE
-
Return the external protected attributes, as set by
COSE.setExternalProtectedAttributes(com.bfo.json.Json) - getFactory() - Method in class com.bfo.json.Json
-
Return the default JsonFactory, as set by
Json.setFactory(com.bfo.json.JsonFactory) - getHeader() - Method in class com.bfo.json.JWT
-
Return the header object.
- getId() - Method in class com.bfo.json.JWK
-
Return the key id, if set.
- getIssuedAt() - Method in class com.bfo.json.JWT
-
Return the issued at claim ("iat") in seconds since the epoch.
- getIssuer() - Method in class com.bfo.json.JWT
-
Return the issuer claim ("iss")
- getKeys() - Method in class com.bfo.json.JWK
-
Retrieve the Keys specified in this JWK.
- getLineNumber() - Method in class com.bfo.json.AbstractReader
-
Return the line number of the input, or 0 if the input is not text-based or is not tracking line numbers
- getListeners() - Method in class com.bfo.json.Json
-
Return the read-only set of listeners on this class.
- getName() - Method in class com.bfo.json.JWT
-
Return the
Principalname, which by default simply callsJWT.getSubject() - getNotBefore() - Method in class com.bfo.json.JWT
-
Return the not before claim ("nbf") in seconds since the epoch.
- getNumSignatures() - Method in class com.bfo.json.COSE
-
Return the number of Sigantures on this COSE object
- getOps() - Method in class com.bfo.json.JWK
-
Return the key operations, if set
- getPath(String) - Method in class com.bfo.json.Json
-
Return the specified descendant of this object, or null if no value exists at the specified path.
- getPayload() - Method in class com.bfo.json.COSE
-
Get the payload from this COSE object.
- getPayload() - Method in class com.bfo.json.JWT
-
Return the payload object.
- getPrivateKey() - Method in class com.bfo.json.JWK
-
Return the PrivateKey from
JWK.getKeys(), or null if none exists - getProtectedAttributes() - Method in class com.bfo.json.COSE
-
Return the protected attributes, which may be null
- getProvider() - Method in class com.bfo.json.COSE
-
Return the Provider set by
COSE.setProvider(java.security.Provider) - getProvider() - Method in class com.bfo.json.JWK
-
Return the Provider set by
JWK.setProvider(java.security.Provider) - getProvider() - Method in class com.bfo.json.JWT
-
Return the Provider set by
JWT.setProvider(java.security.Provider) - getPublicKey() - Method in class com.bfo.json.JWK
-
Return the PublicKey from
JWK.getKeys(), or null if none exists - getSecretKey() - Method in class com.bfo.json.JWK
-
Return the SecretKey from
JWK.getKeys(), or null if none exists - getSignature() - Method in class com.bfo.json.JWT
-
Return the signature object.
- getStringStream() - Method in class com.bfo.json.Json
-
Return a
Readablethat can be used to read the string value from this object. - getStringStreamByteLength() - Method in class com.bfo.json.Json
-
Return the UTF-8 byte-length of Readable returned by
Json.getStringStream()if known, or -1 if it is of indeterminate length. - getSubject() - Method in class com.bfo.json.JWT
-
Return the subject claim ("sub")
- getTag() - Method in class com.bfo.json.Json
-
Return the tag for this item.
- getUniqueID() - Method in class com.bfo.json.JWT
-
Return the unique id claim ("jti")
- getUnprotectedAttributes() - Method in class com.bfo.json.COSE
-
Return the unprotected attributes, which may be null
- getUse() - Method in class com.bfo.json.JWK
-
Return the key use, if set.
H
- has(Object) - Method in class com.bfo.json.Json
-
If object is a Json object, return true if this object is a list or map, and contains that value.
- hashCode() - Method in class com.bfo.json.Json
-
Return a hashCode based on the
Json.value() - hasNext() - Method in class com.bfo.json.AbstractReader
- hasNext() - Method in class com.bfo.json.CborReader
- hasNext() - Method in class com.bfo.json.JsonReader
- hasNext() - Method in class com.bfo.json.MsgpackReader
- hasNext() - Method in class com.bfo.json.YamlReader
- hasPath(String) - Method in class com.bfo.json.Json
-
Return true if this object has a non-null/non-undefined descendant at the specified path.
I
- intValue() - Method in class com.bfo.json.Json
-
Return the value of this node as an integer.
- intValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.intValue()method on it, otherwise return 0 - isBoolean() - Method in class com.bfo.json.Json
-
Return true if this node is a "boolean"
- isBoolean(Object) - Method in class com.bfo.json.Json
-
Return true if the specified child of this object is of type "boolean".
- isBuffer() - Method in class com.bfo.json.Json
-
Return true if this node is a "buffer"
- isBuffer(Object) - Method in class com.bfo.json.Json
-
Return true if the specified child of this object is of type "buffer".
- isDetached() - Method in class com.bfo.json.COSE
-
Return true if the payload was set to "detached".
- isEmpty() - Method in class com.bfo.json.Json
-
Return true if this node is a number, string, buffer, boolean, null or an empty map or list.
- isInitialized() - Method in class com.bfo.json.COSE
-
Return true if this COSE object is initialized.
- isList() - Method in class com.bfo.json.Json
-
Return true if this node is a "list"
- isList() - Method in class com.bfo.json.JsonBuilder
-
Return true if any objects being created will be added to a list
- isList(Object) - Method in class com.bfo.json.Json
-
Return true if the specified child of this object is of type "list".
- isMap() - Method in class com.bfo.json.Json
-
Return true if this node is a "map"
- isMap() - Method in class com.bfo.json.JsonBuilder
-
Return true if any objects being created are being added to a map
- isMap(Object) - Method in class com.bfo.json.Json
-
Return true if the specified wchild of this object is of type "map".
- isNull() - Method in class com.bfo.json.Json
-
Return true if this node is null
- isNull() - Method in class com.bfo.json.JsonStream.Event
-
Return true for
JsonStream.Event.TYPE_PRIMITIVEevents with a null value, otherwise false - isNull(Object) - Method in class com.bfo.json.Json
-
Return true if the specified child of this object is of type "null".
- isNumber() - Method in class com.bfo.json.Json
-
Return true if this node is a "number"
- isNumber(Object) - Method in class com.bfo.json.Json
-
Return true if the specified child of this object is of type "number".
- isSorted() - Method in class com.bfo.json.CborWriter
- isSorted() - Method in interface com.bfo.json.JsonStream
-
Return true if this JsonStream would prefer Map keys to be sorted.
- isSorted() - Method in class com.bfo.json.JsonWriter
- isSorted() - Method in class com.bfo.json.MsgpackWriter
- isString() - Method in class com.bfo.json.Json
-
Return true if this node is a "string"
- isString(Object) - Method in class com.bfo.json.Json
-
Return true if the specified child of this object is of type "string".
- isUndefined() - Method in class com.bfo.json.Json
-
Return true if this node is undefined.
- isUndefined() - Method in class com.bfo.json.JsonStream.Event
-
Return true for
JsonStream.Event.TYPE_PRIMITIVEevents with an undefined value, otherwise false - isUndefined(Object) - Method in class com.bfo.json.Json
-
Return true if the specified child of this object is of type "undefined".
- isValidAt(long) - Method in class com.bfo.json.JWT
-
Check the token was valid at the specified time.
J
- JakartaProvider - Class in com.bfo.json
-
The JsonProvider implementation that provider the JSON-P (Jakarta374) implementation.
- JakartaProvider() - Constructor for class com.bfo.json.JakartaProvider
- Json - Class in com.bfo.json
-
JSON (and now CBOR/Msgpack) implementation that tries to be simple, complete, fast and follow the principle ofi least surprise.
- Json(Object) - Constructor for class com.bfo.json.Json
-
Create a new Json object that represents the specified object.
- Json(Object, JsonFactory) - Constructor for class com.bfo.json.Json
-
Create a new Json object that represents the specified object.
- JsonBuilder - Class in com.bfo.json
- JsonBuilder() - Constructor for class com.bfo.json.JsonBuilder
- jsonEvent(Json, JsonEvent) - Method in interface com.bfo.json.JsonListener
-
Called when a JsonEvent was fired on the object the listener was added to or one of its descendants.
- JsonEvent - Class in com.bfo.json
-
An event object which notifies a
JsonListenerof changes to a Json object. - JsonEvent(Json, Json) - Constructor for class com.bfo.json.JsonEvent
-
Create a new JsonEvent
- JsonFactory - Interface in com.bfo.json
-
A Factory interface that can be implemented to convert more complex types to/from Json if required.
- JsonListener - Interface in com.bfo.json
-
An interface that can be implemented to monitor changes to the Json object tree.
- JsonReader - Class in com.bfo.json
-
A JSON reader
- JsonReader() - Constructor for class com.bfo.json.JsonReader
- JsonStream - Interface in com.bfo.json
-
A processor interface for Json stream events, such as those generated by a file parser or by traversing an existing Json object to write it out.
- JsonStream.Event - Class in com.bfo.json
-
The Events that are processed by a
JsonStream - JsonWriter - Class in com.bfo.json
-
A JSON writer
- JsonWriter() - Constructor for class com.bfo.json.JsonWriter
- JSRProvider - Class in com.bfo.json
-
The JsonProvider implementation that provider the JSON-P (JSR374) implementation.
- JSRProvider() - Constructor for class com.bfo.json.JSRProvider
- JWK - Class in com.bfo.json
-
A class representing a single "JSON Web Key", a JSON representation of an asymmetric key/keypair, or a symmetric key.
- JWK() - Constructor for class com.bfo.json.JWK
-
Create a new, empty JWK
- JWK(byte[], String) - Constructor for class com.bfo.json.JWK
-
Create a new JWK key from a DER encoded secret, public or private key, or PEM encoded versions of public, private or both keys
- JWK(Json) - Constructor for class com.bfo.json.JWK
-
Create a new JWK from the specified Json, sharing its content
- JWK(Json, Provider) - Constructor for class com.bfo.json.JWK
-
Create a new JWK from the specified Json, sharing its content, and set the provider
- JWK(Key) - Constructor for class com.bfo.json.JWK
-
Create a new JWK from the supplied Key
- JWK(KeyPair) - Constructor for class com.bfo.json.JWK
-
Create a new JWK from the supplied KeyPair
- JWT - Class in com.bfo.json
-
A trivial JWT (Json Web Token) implementation Supports all signature algorithms supported by
JWK. - JWT() - Constructor for class com.bfo.json.JWT
-
Create a new JWT with no payload and the "none" algorithm.
- JWT(Json) - Constructor for class com.bfo.json.JWT
-
Create a new JWT with the specified payload and the "none" algorithm.
- JWT(CharSequence) - Constructor for class com.bfo.json.JWT
-
Create a new JWT from the encoded representation
K
- keys() - Method in class com.bfo.json.JsonBuilder
-
Return the list of currently open keys as a stack, with the current one at the end of the list.
L
- leafIterator() - Method in class com.bfo.json.Json
-
Return an Iterator that will descend through every leaf node under this object in a depth-first traveral.
- listValue() - Method in class com.bfo.json.Json
-
Return the value of this node as a list.
- listValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.listValue()method on it, otherwise return null - longValue() - Method in class com.bfo.json.Json
-
Return the value of this node as a long.
- longValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.longValue()method on it, otherwise return 0
M
- mapValue() - Method in class com.bfo.json.Json
-
Return the value of this node as a map.
- mapValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.mapValue()method on it, otherwise return null - MsgpackReader - Class in com.bfo.json
-
A Msgpack reader
- MsgpackReader() - Constructor for class com.bfo.json.MsgpackReader
- MsgpackWriter - Class in com.bfo.json
-
A Msgpack writer
- MsgpackWriter() - Constructor for class com.bfo.json.MsgpackWriter
N
- next() - Method in class com.bfo.json.AbstractReader
- next() - Method in class com.bfo.json.CborReader
- next() - Method in class com.bfo.json.JsonReader
- next() - Method in class com.bfo.json.MsgpackReader
- next() - Method in class com.bfo.json.YamlReader
- nullValue() - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_PRIMITIVEevent with a null value - numberValue() - Method in class com.bfo.json.Json
-
Return the value of this node as a Number.
- numberValue() - Method in class com.bfo.json.JsonStream.Event
-
Return the value for
JsonStream.Event.TYPE_PRIMITIVEevents representing numbers orJsonStream.Event.TYPE_SIMPLE, otherwise null - numberValue(Number) - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_PRIMITIVEevent with the specified number value - numberValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.numberValue()method on it, otherwise return null
O
- objectValue() - Method in class com.bfo.json.Json
-
Return this Json value as a plain object.
- objectValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.objectValue()method on it, otherwise return null
P
- parent() - Method in class com.bfo.json.Json
-
Get the parent of this node, if known
- put(Object, Object) - Method in class com.bfo.json.Json
-
Put the specified value into this object with the specified key.
- putPath(String, Object) - Method in class com.bfo.json.Json
-
Put the specified value into this object or one of its descendants by parsing the specified path.
R
- read(AbstractReader) - Static method in class com.bfo.json.Json
-
Read an object from the specified
AbstractReader - read(InputStream) - Static method in class com.bfo.json.Json
-
Read a Json object from the specified InputStream.
- read(CharSequence) - Static method in class com.bfo.json.Json
-
Read a Json object from the specified String.
- readableByteChannelValue() - Method in class com.bfo.json.JsonStream.Event
-
Return the value for
JsonStream.Event.TYPE_BUFFER_DATAevents created with a ReadableByteChannel, otherwise null - readableValue() - Method in class com.bfo.json.JsonStream.Event
-
Return the value for
JsonStream.Event.TYPE_PRIMITIVEorJsonStream.Event.TYPE_STRING_DATAevents created with a CharSequence, otherwise null - readCbor(InputStream) - Static method in class com.bfo.json.Json
-
Read a CBOR formatted object from the specified InputStream.
- readCbor(ByteBuffer) - Static method in class com.bfo.json.Json
-
Read a CBOR formatted object from the specified ByteBuffer.
- remove(Object) - Method in class com.bfo.json.Json
-
Remove the item at the specified path from this object or one of its descendants.
- removeListener(JsonListener) - Method in class com.bfo.json.Json
-
Remove a
JsonListenerfrom this class - removePath(String) - Method in class com.bfo.json.Json
-
Remove the item at the specified path from this object or one of its descendants.
S
- setAllowNaN(boolean) - Method in class com.bfo.json.JsonWriter
-
Whether to allow NaN and Infinite values in the output.
- setAudience(List<String>) - Method in class com.bfo.json.JWT
-
Set the audience claim ("aud")
- setBigDecimal(boolean) - Method in class com.bfo.json.JsonReader
-
Set true if doubles will be stored as BigDecimal if they contain more digits than can be accurately represented as doubles
- setCborDiag(boolean) - Method in class com.bfo.json.JsonReader
-
Set true if the input is in "CBOR-diag" format
- setCborDiag(String) - Method in class com.bfo.json.JsonWriter
-
Configure this JsonWriter to write CBOR-diag format.
- setCertificates(List<X509Certificate>) - Method in class com.bfo.json.COSE
-
Set a list of X.509 Certificates to be included in the COSE header, or null.
- setCertificates(List<X509Certificate>, String) - Method in class com.bfo.json.JWK
-
Set the list of X.509 certificates specified in the JWK, either as a url or inline.
- setCharset(Charset) - Method in class com.bfo.json.AbstractReader
-
When reading text-based formats (eg Json) from an InputStream, set the Charset to use for decoding.
- setCodingErrorAction(CodingErrorAction) - Method in class com.bfo.json.AbstractReader
-
Set the action to perform when converting an invalid byte sequence to UTF-8.
- setComments(boolean) - Method in class com.bfo.json.JsonReader
-
Set true if the input should accept and discard comments
- setDoubleFormat(String) - Method in class com.bfo.json.JsonWriter
-
The String format to use when formatting a double.
- setDraining() - Method in class com.bfo.json.AbstractReader
-
Indicate that after the read completes, the reader should verify there is no more content following the input.
- setDraining() - Method in class com.bfo.json.CborReader
- setDraining() - Method in class com.bfo.json.JsonReader
- setDraining() - Method in class com.bfo.json.YamlReader
- setExpiry(long) - Method in class com.bfo.json.JWT
-
Set the expiry claim ("exp"), in seconds since the epoch.
- setExternalProtectedAttributes(Json) - Method in class com.bfo.json.COSE
-
Set the external protected attributes on this object, which may be null.
- setFactory(JsonFactory) - Method in class com.bfo.json.Json
-
Set the default JsonFactory for this object and its descendants.
- setFinal() - Method in class com.bfo.json.AbstractReader
-
Indicate that the current input is the final input.
- setFinal() - Method in class com.bfo.json.CborReader
- setFinal() - Method in class com.bfo.json.JsonReader
- setFinal() - Method in class com.bfo.json.YamlReader
- setFloatFormat(String) - Method in class com.bfo.json.JsonWriter
-
The String format to use when formatting a float.
- setId(String) - Method in class com.bfo.json.JWK
-
Set the key id
- setIndent(int) - Method in class com.bfo.json.JsonWriter
-
Set whether the output is pretty-printed with newlines and indenting.
- setInput(InputStream) - Method in class com.bfo.json.AbstractReader
-
Set an InputStream to use as the next source for this reader.
- setInput(InputStream) - Method in class com.bfo.json.CborReader
- setInput(InputStream) - Method in class com.bfo.json.JsonReader
- setInput(InputStream) - Method in class com.bfo.json.MsgpackReader
- setInput(InputStream) - Method in class com.bfo.json.YamlReader
- setInput(CharSequence) - Method in class com.bfo.json.AbstractReader
-
Set an Readable to use as the next source for this reader, which must be a text-based format The input cannot be changed while
AbstractReader.hasNext()returns true. - setInput(CharSequence) - Method in class com.bfo.json.JsonReader
- setInput(CharSequence) - Method in class com.bfo.json.MsgpackReader
- setInput(CharSequence) - Method in class com.bfo.json.YamlReader
- setInput(Readable) - Method in class com.bfo.json.AbstractReader
-
Set an Readable to use as the next source for this reader, which must be a text-based format The input cannot be changed while
AbstractReader.hasNext()returns true. - setInput(Readable) - Method in class com.bfo.json.JsonReader
- setInput(Readable) - Method in class com.bfo.json.MsgpackReader
- setInput(Readable) - Method in class com.bfo.json.YamlReader
- setInput(ByteBuffer) - Method in class com.bfo.json.AbstractReader
-
Set an ByteBuffer to use as the next source for this reader.
- setInput(ByteBuffer) - Method in class com.bfo.json.CborReader
- setInput(ByteBuffer) - Method in class com.bfo.json.JsonReader
- setInput(ByteBuffer) - Method in class com.bfo.json.MsgpackReader
- setInput(ByteBuffer) - Method in class com.bfo.json.YamlReader
- setInput(ReadableByteChannel) - Method in class com.bfo.json.AbstractReader
-
Set an ReadableByteChannel to use as the next source for this reader.
- setInput(ReadableByteChannel) - Method in class com.bfo.json.CborReader
- setInput(ReadableByteChannel) - Method in class com.bfo.json.JsonReader
- setInput(ReadableByteChannel) - Method in class com.bfo.json.MsgpackReader
- setInput(ReadableByteChannel) - Method in class com.bfo.json.YamlReader
- setIssuedAt(long) - Method in class com.bfo.json.JWT
-
Set the issued at claim ("iat") in seconds since the epoch.
- setIssuer(String) - Method in class com.bfo.json.JWT
-
Set the issuer claim ("iss")
- setKeys(Collection<Key>) - Method in class com.bfo.json.JWK
-
Set the Key on this JWK.
- setLineCounting() - Method in class com.bfo.json.AbstractReader
-
Require text-based formats (eg Json) to keep track of line and column numbers when reading.
- setMaxArraySize(int) - Method in class com.bfo.json.JsonWriter
-
Set the maximum number of items to print in an array.
- setMaxStringLength(int) - Method in class com.bfo.json.JsonWriter
-
Set the maximum length of a string.
- setNoLineCounting() - Method in class com.bfo.json.AbstractReader
-
Permit text-based formats (eg Json) to not keep track of line and column numbers when reading.
- setNonDraining() - Method in class com.bfo.json.AbstractReader
-
Indicate that the Reader should try not read any more content after object, because more content may follow.
- setNonDraining() - Method in class com.bfo.json.CborReader
- setNonDraining() - Method in class com.bfo.json.JsonReader
- setNonDraining() - Method in class com.bfo.json.YamlReader
- setNotBefore(long) - Method in class com.bfo.json.JWT
-
Set the not before claim ("nbf") in seconds since the epoch.
- setOps(Collection<String>) - Method in class com.bfo.json.JWK
-
Set the key operations
- setOutput(OutputStream) - Method in class com.bfo.json.CborWriter
-
Set the OutputStream to write to
- setOutput(OutputStream) - Method in class com.bfo.json.MsgpackWriter
-
Set the OutputStream to write to
- setOutput(Appendable) - Method in class com.bfo.json.JsonWriter
-
Set the Appendable to write to
- setOutput(ByteBuffer) - Method in class com.bfo.json.CborWriter
-
Set the ByteBuffer to write to
- setOutput(ByteBuffer) - Method in class com.bfo.json.MsgpackWriter
-
Set the ByteBuffer to write to
- setOutput(CharBuffer) - Method in class com.bfo.json.JsonWriter
-
Set the CharBuffer to write to
- setPartial() - Method in class com.bfo.json.AbstractReader
-
Indicate that the input may be followed by more input when it runs out.
- setPartial() - Method in class com.bfo.json.CborReader
- setPartial() - Method in class com.bfo.json.JsonReader
- setPartial() - Method in class com.bfo.json.YamlReader
- setPayload(ByteBuffer, boolean) - Method in class com.bfo.json.COSE
-
Set the payload to sign.
- setProtectedAttributes(Json) - Method in class com.bfo.json.COSE
-
Set the protected attributes on this object.
- setProvider(Provider) - Method in class com.bfo.json.COSE
-
Set the Provider to be used for any cryptographic operations
- setProvider(Provider) - Method in class com.bfo.json.JWK
-
Set the Provider to be used for any cryptographic operations
- setProvider(Provider) - Method in class com.bfo.json.JWT
-
Set the Provider to be used for any cryptographic operations
- setSorted(boolean) - Method in class com.bfo.json.CborWriter
-
Request that map keys are sorted before writing.
- setSorted(boolean) - Method in class com.bfo.json.JsonWriter
-
Request that map keys are sorted before writing.
- setSorted(boolean) - Method in class com.bfo.json.MsgpackWriter
-
Request that map keys are sorted before writing.
- setSpaceAfterColon(boolean) - Method in class com.bfo.json.JsonWriter
-
Set whether to add a space after colons when printing
- setSpaceAfterComma(boolean) - Method in class com.bfo.json.JsonWriter
-
Set whether to add a space after commas when printing.
- setSubject(String) - Method in class com.bfo.json.JWT
-
Set the subject claim ("sub")
- setTag(long) - Method in class com.bfo.json.Json
-
Set the tag for this item.
- setTrailingComma(boolean) - Method in class com.bfo.json.JsonReader
-
Set true if trailing commas are allowed on input
- setUniqueID(String) - Method in class com.bfo.json.JWT
-
Set the unique id claim ("jti")
- setUnprotectedAttributes(Json) - Method in class com.bfo.json.COSE
-
Set the unprotected attributes on this object.
- setUse(String) - Method in class com.bfo.json.JWK
-
Set the key use
- setValue(Json) - Method in class com.bfo.json.Json
-
Copy the internal value from the specified Json object to this object.
- sign(Key) - Method in class com.bfo.json.JWT
-
Sign the JWT.
- sign(Key, String) - Method in class com.bfo.json.COSE
-
Sign the COSE.
- sign(Map<Key, String>) - Method in class com.bfo.json.COSE
-
Sign the COSE with multiple signatures.
- simple(int) - Static method in class com.bfo.json.JsonStream.Event
-
Get a
JsonStream.Event.TYPE_SIMPLEevent with the specified value. - size() - Method in class com.bfo.json.Json
-
Return the size of this object, or zero if this object is a number, string, buffer, boolean or null.
- size() - Method in class com.bfo.json.JsonStream.Event
-
Return the size specified in the event, or 0 if the event has no size
- sort() - Method in class com.bfo.json.Json
-
For Json objects that are maps, sort the map keys.
- startBuffer(long) - Static method in class com.bfo.json.JsonStream.Event
-
Create a new
JsonStream.Event.TYPE_BUFFER_STARTevent - startList(int) - Static method in class com.bfo.json.JsonStream.Event
-
Create a new
JsonStream.Event.TYPE_MAP_STARTevent - startMap(int) - Static method in class com.bfo.json.JsonStream.Event
-
Create a new
JsonStream.Event.TYPE_MAP_STARTevent - startString(long) - Static method in class com.bfo.json.JsonStream.Event
-
Create a new
JsonStream.Event.TYPE_STRING_STARTevent - stringData(CharSequence) - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_STRING_DATAevent with the specifiedCharSequence. - stringData(Readable) - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_STRING_DATAevent with the specifiedReadableZero or more events of this type are issued betweenJsonStream.Event.startString(long)andJsonStream.Event.endString()events Note the parameter is not copied and the underlying array may be reused, so the event should be processed immediately. - stringValue() - Method in class com.bfo.json.Json
-
Return the value of this node as a String.
- stringValue() - Method in class com.bfo.json.JsonStream.Event
-
Return the value for
JsonStream.Event.TYPE_PRIMITIVEorJsonStream.Event.TYPE_STRING_DATAevents created with a CharSequence, otherwise null - stringValue(CharSequence, int) - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_PRIMITIVEevent with the specified string value. - stringValue(Object) - Method in class com.bfo.json.Json
-
If the specified child of this object exists call the
Json.stringValue()method on it, otherwise return null
T
- tagNext(long) - Static method in class com.bfo.json.JsonStream.Event
-
Specify a tag to apply to to the next map, list, string, buffer or primitive value
- tagValue() - Method in class com.bfo.json.JsonStream.Event
-
For
JsonStream.Event.TYPE_TAGevents, return the tag value, or 0 for other events - toCbor() - Method in class com.bfo.json.Json
-
Return a Cbor representation of this Json object as a ByteBuffer which is guaranteed to be backed by an array of the exact size (so calling
.array()to retrieve the bytes is safe) - toCOSEKey() - Method in class com.bfo.json.JWK
-
Convert this JWK key to a COSE Key (https://datatracker.ietf.org/doc/html/rfc9052#section-7)
- toJson(Object) - Method in interface com.bfo.json.JsonFactory
-
Given a regular Object, return the equivalent Json object if this factory knows about it, otherwise return null.
- toString() - Method in class com.bfo.json.AbstractReader
- toString() - Method in class com.bfo.json.Json
-
Return a String representation of this Json object.
- toString() - Method in class com.bfo.json.JsonEvent
- toString() - Method in class com.bfo.json.JsonStream.Event
- toString() - Method in class com.bfo.json.JWT
-
Return the encoded JWT
- toString(JsonWriter) - Method in class com.bfo.json.Json
-
Return a String representation of this Json object, written using the specifed
JsonWriter. - type() - Method in class com.bfo.json.Json
-
Return the type of this node, which may be "number", "string", "boolean", "list", "map", "buffer", "null" or (since v5) "undefined"
- type() - Method in class com.bfo.json.JsonStream.Event
-
Return the type, eg
JsonStream.Event.TYPE_MAP_END - TYPE_BUFFER_DATA - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_BUFFER_END - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_BUFFER_START - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_LIST_END - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_LIST_START - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_MAP_END - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_MAP_START - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_PRIMITIVE - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_SIMPLE - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_STRING_DATA - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_STRING_END - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_STRING_START - Static variable in class com.bfo.json.JsonStream.Event
- TYPE_TAG - Static variable in class com.bfo.json.JsonStream.Event
U
- UNDEFINED - Static variable in class com.bfo.json.Json
-
A constant object that can be passed into the Json constructor to create a Cbor "undefined" value
- undefinedValue() - Static method in class com.bfo.json.JsonStream.Event
-
Get an
JsonStream.Event.TYPE_PRIMITIVEevent with an "undefined" value
V
- value() - Method in class com.bfo.json.Json
- value() - Method in class com.bfo.json.JsonStream.Event
-
Return the value for
JsonStream.Event.TYPE_PRIMITIVEevents - verify(Key) - Method in class com.bfo.json.JWT
-
Verify the JWT.
- verify(PublicKey) - Method in class com.bfo.json.COSE
-
Verify a COSE that is
initialized
W
- write(JsonStream) - Method in class com.bfo.json.AbstractReader
- write(JsonStream) - Method in class com.bfo.json.Json
-
Write the Json object to the specified stream
Y
- YamlReader - Class in com.bfo.json
-
A Yaml reader, almost entirely based on the Tokenizer from the YamlBeans project.
- YamlReader() - Constructor for class com.bfo.json.YamlReader
All Classes and Interfaces|All Packages|Constant Field Values