APIdia Launch Partner
Top Description Fields Constructors Methods
io.github.spannm.jackcess.impl

public Class NullMask

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer

Bitmask that indicates whether or not each column in a row is null. Also holds values of boolean columns.
Author
Tim McCune

Field Summary

Modifier and TypeField and Description
private final int
columnCount

num row columns

private final byte[]
mask

The actual bitmask

Constructor Summary

AccessConstructor and Description
public
NullMask(int
Number of columns in the row that this mask will be used for
columnCount
)

Method Summary

Modifier and TypeMethod and Description
private static byte
bitMask(int columnNumber)

private static int
byteIndex(int columnNumber)

public int

Returns:

Size in bytes of this mask
byteSize
()

Returns size in bytes of this mask.

public boolean

Returns:

Whether or not the value for that column is null. For boolean columns, returns the actual value of the column (where non-null == true)
isNull
(ColumnImpl
column to test for null
column
)

Returns whether or not the value for that column is null.

public void
markNotNull(ColumnImpl
column to be marked non-null
column
)

Indicate that the column with the given number is not null (or a boolean value is true).

public void
read(ByteBuffer buffer)

Read a mask in from a buffer

public void
write(ByteBuffer buffer)

Write a mask to a buffer

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnCountback to summary
private final int columnCount

num row columns

maskback to summary
private final byte[] mask

The actual bitmask

Constructor Detail

NullMaskback to summary
public NullMask(int columnCount)
Parameters
columnCount:int

Number of columns in the row that this mask will be used for

Method Detail

bitMaskback to summary
private static byte bitMask(int columnNumber)
byteIndexback to summary
private static int byteIndex(int columnNumber)
byteSizeback to summary
public int byteSize()

Returns size in bytes of this mask.

Returns:int

Size in bytes of this mask

isNullback to summary
public boolean isNull(ColumnImpl column)

Returns whether or not the value for that column is null. For boolean columns, returns the actual value of the column (where non-null == true).

Parameters
column:ColumnImpl

column to test for null

Returns:boolean

Whether or not the value for that column is null. For boolean columns, returns the actual value of the column (where non-null == true)

markNotNullback to summary
public void markNotNull(ColumnImpl column)

Indicate that the column with the given number is not null (or a boolean value is true).

Parameters
column:ColumnImpl

column to be marked non-null

readback to summary
public void read(ByteBuffer buffer)

Read a mask in from a buffer

writeback to summary
public void write(ByteBuffer buffer)

Write a mask to a buffer