public class ByteArrayTranslatorFactory extends SimpleTranslatorFactory<byte[],com.google.cloud.datastore.Blob>
Translates a byte[] to Blob. Make sure this translator gets registered *before* the normal ArrayTranslator otherwise it won't get used.
Modifier | Constructor and Description |
---|---|
protected |
ByteArrayTranslatorFactory() |
Modifier and Type | Method and Description |
---|---|
protected com.google.cloud.datastore.Value<com.google.cloud.datastore.Blob> |
toDatastore(byte[] value) |
protected byte[] |
toPojo(com.google.cloud.datastore.Value<com.google.cloud.datastore.Blob> value) |
createValueTranslator
create
protected byte[] toPojo(com.google.cloud.datastore.Value<com.google.cloud.datastore.Blob> value)
toPojo
in class SimpleTranslatorFactory<byte[],com.google.cloud.datastore.Blob>
protected com.google.cloud.datastore.Value<com.google.cloud.datastore.Blob> toDatastore(byte[] value)
toDatastore
in class SimpleTranslatorFactory<byte[],com.google.cloud.datastore.Blob>
Copyright © 2018. All rights reserved.