
public class DataBlock extends Object
| Constructor and Description |
|---|
DataBlock()
Create a simple and empty DataBlock
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the object
|
io.netty.buffer.ByteBuf |
getBlock() |
int |
getByteCount() |
byte |
getByteCountLower() |
byte |
getByteCountUpper() |
byte[] |
getByteMarkers() |
byte |
getDescriptor() |
int[] |
getMarkers() |
boolean |
isCleared()
Is this Block cleared
|
boolean |
isEOF() |
boolean |
isEOR() |
boolean |
isERROR() |
boolean |
isRESTART() |
void |
setBlock(io.netty.buffer.ByteBuf block)
Set the block and the byte count according to the block
|
void |
setByteCount(byte upper,
byte lower) |
void |
setByteCount(int byteCount) |
void |
setDescriptor(int descriptor) |
void |
setEOF(boolean isEOF) |
void |
setEOR(boolean isEOR) |
void |
setERROR(boolean isERROR) |
void |
setMarkers(int[] markers)
Set the markers and the byte count
|
void |
setRESTART(boolean isRESTART) |
static String |
toBinaryString(byte[] bytes,
boolean cutted)
Translate the given array of byte into a string in binary format
|
String |
toString() |
public io.netty.buffer.ByteBuf getBlock()
public void setBlock(io.netty.buffer.ByteBuf block)
block - the block to setpublic int getByteCount()
public void setByteCount(int byteCount)
byteCount - the byteCount to setpublic void setByteCount(byte upper,
byte lower)
upper - upper byte of the 2 bytes lengthlower - lower byte of the 2 bytes lengthpublic byte getByteCountUpper()
public byte getByteCountLower()
public byte getDescriptor()
public void setDescriptor(int descriptor)
descriptor - the descriptor to setpublic boolean isEOF()
public void setEOF(boolean isEOF)
isEOF - the isEOF to setpublic boolean isEOR()
public void setEOR(boolean isEOR)
isEOR - the isEOR to setpublic boolean isERROR()
public void setERROR(boolean isERROR)
isERROR - the isERROR to setpublic boolean isRESTART()
public void setRESTART(boolean isRESTART)
isRESTART - the isRESTART to setpublic int[] getMarkers()
public byte[] getByteMarkers()
public void setMarkers(int[] markers)
markers - the markers to setpublic void clear()
public boolean isCleared()
public static String toBinaryString(byte[] bytes, boolean cutted)
bytes - cutted - True if each Byte should be 'blank' separated or
notCopyright © 2009–2020 Waarp. All rights reserved.