| Modifier and Type | Field and Description |
|---|---|
| pack-priv final char[] | data
The bucket data |
| pack-priv int | length
The number of characters this bucket contain. |
| Access | Constructor and Description |
|---|---|
| public | CharBucket(int
the maximum capacity of the bucket bucketSize)Creates a bucket capable of holding a fixed number of characters |
| public | CharBucket(int
the maximum capacity of the bucket bucketSize, char a character used to fill all positions of the bucket. fillWith)Creates a bucket capable of holding a fixed number of characters |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the number of characters extracted from the readerthe source of characters used to fill the bucket reader)Fills the bucket with the characters take from a The |
| public boolean | Returns: true if the bucket is empty (i.e. length <= 0), false otherwise.Returns true if the bucket is empty (i.e. length <= 0), false otherwise. |
| data | back to summary |
|---|---|
| pack-priv final char[] data The bucket data | |
| length | back to summary |
|---|---|
| pack-priv int length The number of characters this bucket contain. It is modified every time | |
| CharBucket | back to summary |
|---|---|
| public CharBucket(int bucketSize) Creates a bucket capable of holding a fixed number of characters
| |
| CharBucket | back to summary |
|---|---|
| public CharBucket(int bucketSize, char fillWith) Creates a bucket capable of holding a fixed number of characters
| |
| fill | back to summary |
|---|---|
| public int fill(Reader reader) throws IOException Fills the bucket with the characters take from a The
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if the bucket is empty (i.e. length <= 0), false otherwise.
| |