Top Fields Constructors Methods
com.amazon.ion.impl.lite

pack-priv abstract Class IonLobLite

extends IonValueLite
implements IonLob
Class Inheritance
All Implemented Interfaces
com.amazon.ion.IonLob, com.amazon.ion.IonValue, java.lang.Cloneable
Known Direct Subclasses
com.amazon.ion.impl.lite.IonBlobLite, com.amazon.ion.impl.lite.IonClobLite
Imports
com.amazon.ion.IonLob, java.io.ByteArrayInputStream, .InputStream, java.util.zip.CRC32

Field Summary

Modifier and TypeField and Description
private byte[]
Inherited from com.amazon.ion.impl.lite.IonValueLite:
_annotations_context_fieldNameCONTAINER_STACK_INITIAL_CAPACITYELEMENT_SHIFTIS_AUTO_CREATEDIS_BOOL_TRUEIS_IVMIS_LOCKEDIS_NULL_VALUEIS_SYMBOL_ID_PRESENTIS_SYMBOL_PRESENTIS_SYSTEM_VALUE

Constructor Summary

AccessConstructor and Description
protected
IonLobLite(ContainerlessContext context, boolean isNull)

pack-priv
IonLobLite(IonLobLite existing, IonContext context)

Method Summary

Modifier and TypeMethod and Description
public final int
byteSize()

Implements com.amazon.ion.IonLob.byteSize.

Gets the size in bytes of this lob.

public abstract IonLobLite
clone()

Redeclares com.amazon.ion.IonLob.clone, com.amazon.ion.IonValue.clone.

Implements abstract com.amazon.ion.impl.lite.IonValueLite.clone.

Creates a copy of this value and all of its children.

protected final void
copyBytesFrom(byte[]
may be null to make this an Ion null value.
source
,
int offset, int length)

public final byte[]
getBytes()

Implements com.amazon.ion.IonLob.getBytes.

Gets all the data of this lob, or null if this is an Ion null value.

protected byte[]
getBytesNoCopy()

Get the byte array without copying

protected int

Returns:

hash code
lobHashCode
(int
Seed value
seed
)

Calculate LOB hash code as XOR of seed with CRC-32 of the LOB data.

public final InputStream
newInputStream()

Implements com.amazon.ion.IonLob.newInputStream.

Creates a new InputStream that returns the data as raw bytes.

public final void
setBytes(byte[]
the new data for the lob; may be null to make this an Ion null value.
bytes
)

Implements com.amazon.ion.IonLob.setBytes.

Sets the data of this lob, copying bytes from an array.

public final void
setBytes(byte[]
the new data for the lob; may be null to make this an Ion null value.
bytes
,
int
the offset within the array of the first byte to copy; must be non-negative and no larger than bytes.length.
offset
,
int
the number of bytes to be copied from the given array; must be non-negative and no larger than bytes.length - offset.
length
)

Implements com.amazon.ion.IonLob.setBytes.

Sets the data of this lob, copying bytes from part of an array.

Inherited from com.amazon.ion.impl.lite.IonValueLite:
_elementid_elementid_getMetadata_isAutoCreated_isAutoCreated_isBoolTrue_isBoolTrue_isIVM_isIVM_isLocked_isLocked_isNullValue_isNullValue_isSymbolIdPresent_isSymbolIdPresent_isSymbolPresent_isSymbolPresent_isSystemValue_isSystemValue_setMetadataacceptaddTypeAnnotationattemptClearSymbolIDValuescascadeSIDPresentToContextRootcheckAnnotationsForSidscheckForLockclearSymbolIDValuesclearTypeAnnotationscopyFieldNamedetachFromContainerdumpequalsfindTypeAnnotationgetAssignedSymbolTablegetContainergetContextgetElementIdgetFieldIdgetFieldNamegetFieldNameIdgetFieldNameSymbolgetFieldNameSymbolgetKnownFieldNameSymbolgetSymbolTablegetSystemgetTypegetTypeAnnotationsgetTypeAnnotationSymbolsgetTypeAnnotationSymbolsgetTypeSlowhashCodehashSignaturehashTypeAnnotationshasTypeAnnotationisNullValueisReadOnlymakeReadOnlymakeReadOnlyInternalremoveFromContainerremoveTypeAnnotationscalarHashCodesetContextsetFieldNamesetFieldNameSymbolsetSymbolTablesetTypeAnnotationssetTypeAnnotationSymbolsshallowClonetopLevelValuetoPrettyStringtoStringtoStringvalidatevalidateThisNotNullwriteBodyTowriteTowriteTo

Field Detail

_lob_valueback to summary
private byte[] _lob_value

Constructor Detail

IonLobLiteback to summary
protected IonLobLite(ContainerlessContext context, boolean isNull)
IonLobLiteback to summary
pack-priv IonLobLite(IonLobLite existing, IonContext context)

Method Detail

byteSizeback to summary
public final int byteSize()

Implements com.amazon.ion.IonLob.byteSize.

Doc from com.amazon.ion.IonLob.byteSize.

Gets the size in bytes of this lob.

Returns:int

the lob's size in bytes.

cloneback to summary
public abstract IonLobLite clone()

Redeclares com.amazon.ion.IonLob.clone, com.amazon.ion.IonValue.clone.

Implements abstract com.amazon.ion.impl.lite.IonValueLite.clone.

Doc from com.amazon.ion.IonValue.clone.

Creates a copy of this value and all of its children. The cloned value may use the same shared symbol tables, but it will have an independent local symbol table if necessary. The cloned value will be modifiable regardless of whether this instance isReadOnly().

The cloned value will be created in the context of the same ValueFactory as this instance; if you want a copy using a different factory, then use ValueFactory#clone(IonValue) instead.

Returns:IonLobLite

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
copyBytesFromback to summary
protected final void copyBytesFrom(byte[] source, int offset, int length)
Parameters
source:byte[]

may be null to make this an Ion null value.

getBytesback to summary
public final byte[] getBytes()

Implements com.amazon.ion.IonLob.getBytes.

Doc from com.amazon.ion.IonLob.getBytes.

Gets all the data of this lob, or null if this is an Ion null value.

Returns:byte[]

a new byte array, or null if this.isNullValue().

getBytesNoCopyback to summary
protected byte[] getBytesNoCopy()

Get the byte array without copying

lobHashCodeback to summary
protected int lobHashCode(int seed)

Calculate LOB hash code as XOR of seed with CRC-32 of the LOB data. This distinguishes BLOBs from CLOBs

Parameters
seed:int

Seed value

Returns:int

hash code

newInputStreamback to summary
public final InputStream newInputStream()

Implements com.amazon.ion.IonLob.newInputStream.

Doc from com.amazon.ion.IonLob.newInputStream.

Creates a new InputStream that returns the data as raw bytes.

Returns:InputStream

a new stream positioned at the start of the lob, or null if this.isNullValue().

setBytesback to summary
public final void setBytes(byte[] bytes)

Implements com.amazon.ion.IonLob.setBytes.

Doc from com.amazon.ion.IonLob.setBytes.

Sets the data of this lob, copying bytes from an array.

Parameters
bytes:byte[]

the new data for the lob; may be null to make this an Ion null value.

setBytesback to summary
public final void setBytes(byte[] bytes, int offset, int length)

Implements com.amazon.ion.IonLob.setBytes.

Doc from com.amazon.ion.IonLob.setBytes.

Sets the data of this lob, copying bytes from part of an array.

This method copies length bytes from the given array into this value, starting at the given offset in the array.

Parameters
bytes:byte[]

the new data for the lob; may be null to make this an Ion null value.

offset:int

the offset within the array of the first byte to copy; must be non-negative and no larger than bytes.length.

length:int

the number of bytes to be copied from the given array; must be non-negative and no larger than bytes.length - offset.