Package com.jsql.util.bruter
Class BaseNCodec.Context
java.lang.Object
com.jsql.util.bruter.BaseNCodec.Context
- Enclosing class:
BaseNCodec
Holds thread context so classes can be thread-safe.
This class is not itself thread-safe; each thread must allocate its own copy.
- Since:
- 1.7
-
Field Summary
Modifier and TypeFieldDescriptionprotected byte[]
Buffer for streaming.protected int
Variable tracks how many characters have been written to the current line.protected boolean
Boolean flag to indicate the EOF has been reached.protected int
Place holder for the bytes we're dealing with for our based logic.protected long
Place holder for the bytes we're dealing with for our based logic.protected int
Writes to the buffer only occur after every 3/5 reads when encoding, and every 4/8 reads when decoding.protected int
Position where next character should be written in the buffer.protected int
Position where next character should be read from the buffer. -
Constructor Summary
-
Method Summary
-
Field Details
-
ibitWorkArea
protected int ibitWorkAreaPlace holder for the bytes we're dealing with for our based logic. Bitwise operations store and extract the encoding or decoding from this variable. -
lbitWorkArea
protected long lbitWorkAreaPlace holder for the bytes we're dealing with for our based logic. Bitwise operations store and extract the encoding or decoding from this variable. -
buffer
protected byte[] bufferBuffer for streaming. -
pos
protected int posPosition where next character should be written in the buffer. -
readPos
protected int readPosPosition where next character should be read from the buffer. -
eof
protected boolean eofBoolean flag to indicate the EOF has been reached. Once EOF has been reached, this object becomes useless, and must be thrown away. -
currentLinePos
protected int currentLinePosVariable tracks how many characters have been written to the current line. Only used when encoding. We use it to make sure each encoded line never goes beyond lineLength (if lineLength > 0). -
modulus
protected int modulusWrites to the buffer only occur after every 3/5 reads when encoding, and every 4/8 reads when decoding. This variable helps track that.
-
-
Constructor Details
-
Context
protected Context()
-
-
Method Details