Top Description Fields Constructors Methods
org.h2.value

public final Class ValueBinary

extends ValueBytesBase
Class Inheritance
Imports
java.nio.charset.StandardCharsets, org.h2.engine.SysProperties, org.h2.util.Utils

Implementation of the BINARY data type.

Field Summary

Modifier and TypeField and Description
private TypeInfo
type

Associated TypeInfo.

Inherited from org.h2.value.ValueBytesBase:
hashvalue

Constructor Summary

AccessConstructor and Description
private
ValueBinary(byte[] value)

Method Summary

Modifier and TypeMethod and Description
public static ValueBinary

Returns:

the value
get
(byte[]
the byte array
b
)

Get or create a VARBINARY value for the given byte array.

public static ValueBinary

Returns:

the value
getNoCopy
(byte[]
the byte array
b
)

Get or create a VARBINARY value for the given byte array.

public StringBuilder
getSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Overrides org.h2.value.ValueBytesBase.getSQL.

Implements org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

public String
getString()

Implements abstract org.h2.value.Value.getString.

Get the value as a string.

public TypeInfo
getType()

Implements abstract org.h2.value.Value.getType.

Implements org.h2.value.Typed.getType.

Returns the data type.

public int
getValueType()

Implements abstract org.h2.value.Value.getValueType.

Get the value type.

Inherited from org.h2.value.ValueBytesBase:
compareTypeSafeequalsgetBytesgetBytesNoCopygetMemoryhashCode

Field Detail

typeback to summary
private TypeInfo type

Associated TypeInfo.

Constructor Detail

ValueBinaryback to summary
private ValueBinary(byte[] value)

Method Detail

getback to summary
public static ValueBinary get(byte[] b)

Get or create a VARBINARY value for the given byte array. Clone the data.

Parameters
b:byte[]

the byte array

Returns:ValueBinary

the value

getNoCopyback to summary
public static ValueBinary getNoCopy(byte[] b)

Get or create a VARBINARY value for the given byte array. Do not clone the date.

Parameters
b:byte[]

the byte array

Returns:ValueBinary

the value

getSQLback to summary
public StringBuilder getSQL(StringBuilder builder, int sqlFlags)

Overrides org.h2.value.ValueBytesBase.getSQL.

Implements org.h2.util.HasSQL.getSQL.

Doc from org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
getStringback to summary
public String getString()

Implements abstract org.h2.value.Value.getString.

Doc from org.h2.value.Value.getString.

Get the value as a string.

Returns:String

the string

Annotations
@Override
getTypeback to summary
public TypeInfo getType()

Implements abstract org.h2.value.Value.getType.

Implements org.h2.value.Typed.getType.

Doc from org.h2.value.Typed.getType.

Returns the data type.

Returns:TypeInfo

the data type

Annotations
@Override
getValueTypeback to summary
public int getValueType()

Implements abstract org.h2.value.Value.getValueType.

Doc from org.h2.value.Value.getValueType.

Get the value type.

Returns:int

the value type

Annotations
@Override