MCPcopy
hub / github.com/google/gson / getAsByte

Method getAsByte

gson/src/main/java/com/google/gson/JsonArray.java:357–360  ·  view source on GitHub ↗

Convenience method to get this array as a primitive byte if it contains a single element. This method calls {@link JsonElement#getAsByte()} on the element, therefore any of the exceptions declared by that method can occur. @return this element as a primitive byte if it is single element array. @thr

()

Source from the content-addressed store, hash-verified

355 * @throws IllegalStateException if the array is empty or has more than one element.
356 */
357 @Override
358 public byte getAsByte() {
359 return getAsSingleElement().getAsByte();
360 }
361
362 /**
363 * Convenience method to get this array as a character if it contains a single element. This

Callers 1

Calls 1

getAsSingleElementMethod · 0.95

Tested by 1