Skip to content

Commit

Permalink
Add JavaDoc for byte-ish blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Apr 1, 2024
1 parent 32e4ab3 commit ca5749d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
import static io.airlift.slice.SizeOf.sizeOf;
import static java.lang.String.format;

/**
* A block that contains positionCount bytes. Only bytes can be read.
* Other block methods like getInt(), getLong(), etc. throw UnsupportedOperationException.
*
* Despite the name, this block contains individual bytes, not byte arrays.
* For byte arrays use a VariableWidthBlock.
*/
public class ByteArrayBlock
implements Block
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
import static io.airlift.slice.Slices.EMPTY_SLICE;
import static java.lang.String.format;

/**
* A block that contains positionCount elements.
* All block methods are supported: getInt(), getLong(), etc.
* Whether the values they return make sense depends on what
* was stored at that position.
*/
public class VariableWidthBlock
extends AbstractVariableWidthBlock
{
Expand Down

0 comments on commit ca5749d

Please sign in to comment.