summaryrefslogtreecommitdiffstats
path: root/src/org/uic/barcode/asn1/uper/BitBuffer.java
blob: bba0de7aa479522803410d8a8db5d610eb65c53f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package org.uic.barcode.asn1.uper;

/**
 * An interface for convenient storage of bits, similar to Java's ByteBuffer.
 *
 * This interface and its implementation are very useful for UPER, since UPER operates on bits
 * regardless of byte boundaries.
 *
 */
public interface BitBuffer {
    boolean get();
    boolean get(int index);
    BitBuffer put(boolean element);
    BitBuffer put(int index, boolean element);
    int limit();
    int capacity();
    int position();
    int remaining();
    BitBuffer flip();
    String toBooleanString(int startIndex, int length);
    String toBooleanStringFromPosition(int startIndex);
    byte[] array();
    BitBuffer putByte(byte element);
    byte getByte();
	void putInteger(int index, int length,int number);
	void putChar6String(int index, int length, String s);
	int getInteger(int index, int length);
	String getChar6String(int position, int length);
	void putChar5String(int index, int length, String s);
	String getChar5String(int inxed, int length);
	BitBuffer putByteArray(int index, byte[] data);
}