@Override protected StructuredJsonGenerator createWriter(JsonFactory jsonFactory, String contentType) { return new SdkJsonGenerator(jsonFactory, contentType); } };
/** * Get the JSON content as a UTF-8 encoded byte array. It is recommended to hold onto the array * reference rather then making repeated calls to this method as a new array will be created * each time. * * @return Array of UTF-8 encoded bytes that make up the generated JSON. */ @Override public byte[] getBytes() { close(); return baos.toByteArray(); }
@Override public byte[] getBytes() { try { return super.getBytes(); } catch (NoSuchMethodError e) { throw new RuntimeException( "Jackson jackson-core/jackson-dataformat-cbor incompatible library version detected.\nYou have two possible resolutions:\n" + "\t\t1) Ensure the com.fasterxml.jackson.core:jackson-core & com.fasterxml.jackson.dataformat:jackson-dataformat-cbor libraries " + "on your classpath have the same version number\n" + "\t\t2) Disable CBOR wire-protocol by passing the -D" + AWS_CBOR_DISABLE_SYSTEM_PROPERTY + " property or setting the " + AWS_CBOR_DISABLE_ENV_VAR + " environment variable (warning this may affect performance)", e); } } }
@Override protected StructuredJsonGenerator createWriter(JsonFactory jsonFactory, String contentType) { return new SdkJsonGenerator(jsonFactory, contentType); } };
/** * Get the JSON content as a UTF-8 encoded byte array. It is recommended to hold onto the array * reference rather then making repeated calls to this method as a new array will be created * each time. * * @return Array of UTF-8 encoded bytes that make up the generated JSON. */ @Override public byte[] getBytes() { close(); return baos.toByteArray(); }
@Override public byte[] getBytes() { try { return super.getBytes(); } catch (NoSuchMethodError e) { throw new RuntimeException( "Jackson jackson-core/jackson-dataformat-cbor incompatible library version detected.\nYou have two possible resolutions:\n" + "\t\t1) Ensure the com.fasterxml.jackson.core:jackson-core & com.fasterxml.jackson.dataformat:jackson-dataformat-cbor libraries " + "on your classpath have the same version number\n" + "\t\t2) Disable CBOR wire-protocol by passing the -D" + AWS_CBOR_DISABLE_SYSTEM_PROPERTY + " property or setting the " + AWS_CBOR_DISABLE_ENV_VAR + " environment variable (warning this may affect performance)", e); } } }
@Override protected StructuredJsonGenerator createWriter(JsonFactory jsonFactory, String contentType) { return new SdkJsonGenerator(jsonFactory, contentType); } };
/** * Get the JSON content as a UTF-8 encoded byte array. It is recommended to hold onto the array * reference rather then making repeated calls to this method as a new array will be created * each time. * * @return Array of UTF-8 encoded bytes that make up the generated JSON. */ @Override public byte[] getBytes() { close(); return baos.toByteArray(); }
@Override public byte[] getBytes() { try { return super.getBytes(); } catch (NoSuchMethodError e) { throw new RuntimeException( "Jackson jackson-core/jackson-dataformat-cbor incompatible library version detected.\nYou have two possible resolutions:\n" + "\t\t1) Ensure the com.fasterxml.jackson.core:jackson-core & com.fasterxml.jackson.dataformat:jackson-dataformat-cbor libraries " + "on your classpath have the same version number\n" + "\t\t2) Disable CBOR wire-protocol by passing the -D" + AWS_CBOR_DISABLE_SYSTEM_PROPERTY + " property or setting the " + AWS_CBOR_DISABLE_ENV_VAR + " environment variable (warning this may affect performance)", e); } } }