Top Description Fields Constructors Methods
org.graalvm.nativebridge

pack-priv final Class StringMarshaller

extends Object
implements BinaryMarshaller<String>
Class Inheritance
All Implemented Interfaces
org.graalvm.nativebridge.BinaryMarshaller

BinaryMarshaller used to marshall string array components.

Field Summary

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
inferSize(String object)

Overrides default org.graalvm.nativebridge.BinaryMarshaller.inferSize.

Estimates a size in bytes needed to marshall given object.

public String
read(BinaryInput in)

Implements org.graalvm.nativebridge.BinaryMarshaller.read.

Deserializes and recreates an object passed to a foreign method.

public void
write(BinaryOutput out, String str)

Implements org.graalvm.nativebridge.BinaryMarshaller.write.

Decomposes and serializes the given object passed to a foreign method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

STRING_SIZE_ESTIMATEback to summary
private static final int STRING_SIZE_ESTIMATE

Constructor Detail

StringMarshallerback to summary
pack-priv StringMarshaller()

Method Detail

inferSizeback to summary
public int inferSize(String object)

Overrides default org.graalvm.nativebridge.BinaryMarshaller.inferSize.

Doc from org.graalvm.nativebridge.BinaryMarshaller.inferSize.

Estimates a size in bytes needed to marshall given object. The returned value is used to pre-allocate the BinaryOutput's buffer. The accuracy of the estimate affects the speed of marshalling. If the estimate is too small, the pre-allocated buffer must be re-allocated and the already marshalled data must be copied. Too large a value may cause the static buffer to be unused and the dynamic buffer to be unnecessarily allocated.

Annotations
@Override
readback to summary
public String read(BinaryInput in)

Implements org.graalvm.nativebridge.BinaryMarshaller.read.

Doc from org.graalvm.nativebridge.BinaryMarshaller.read.

Deserializes and recreates an object passed to a foreign method.

Annotations
@Override
writeback to summary
public void write(BinaryOutput out, String str)

Implements org.graalvm.nativebridge.BinaryMarshaller.write.

Doc from org.graalvm.nativebridge.BinaryMarshaller.write.

Decomposes and serializes the given object passed to a foreign method.

Annotations
@Override