1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.asn1new.ber.tlv;
18
19 import org.apache.asn1.codec.DecoderException;
20
21
22
23 /***
24 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
25 */
26 public interface ITLVBerDecoderMBean
27 {
28
29
30 /*** Set the number of bytes that can be used to encode the Value length,
31 * including the first byte.
32 * Max is 127 if the Length use a definite form, default is 1
33 *
34 * @param length The number of byte to use
35 */
36 void setMaxLengthLength( int length ) throws DecoderException;
37
38 /*** Set the maximum number of bytes that should be used to encode a Tag label,
39 * including the first byte.
40 * Default is 1, no maximum
41 *
42 * @param length The length to use
43 */
44 void setMaxTagLength( int length );
45
46 /*** Allow indefinite length. */
47 void allowIndefiniteLength();
48
49 /*** Disallow indefinite length. */
50 void disallowIndefiniteLength();
51
52 /*** Get the actual maximum number of bytes that can be used to encode the Length
53 *
54 * @return The maximum bytes of the Length
55 */
56 int getMaxLengthLength();
57
58 /*** Get the actual maximum number of bytes that can be used to encode the Tag
59 * @return The maximum length of the Tag
60 */
61 int getMaxTagLength();
62
63 /*** Tell if indefinite length form could be used for Length
64 * @return <code>true</code> if the Indefinite form is allowed
65 */
66 boolean isIndefiniteLengthAllowed();
67 }