1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.universAAL.lddi.lib.ieeex73std.org.bn.metadata;
19
20 import java.io.InputStream;
21 import java.io.OutputStream;
22
23 import org.universAAL.lddi.lib.ieeex73std.org.bn.annotations.ASN1Any;
24 import org.universAAL.lddi.lib.ieeex73std.org.bn.annotations.ASN1BitString;
25 import org.universAAL.lddi.lib.ieeex73std.org.bn.coders.DecodedObject;
26 import org.universAAL.lddi.lib.ieeex73std.org.bn.coders.ElementInfo;
27 import org.universAAL.lddi.lib.ieeex73std.org.bn.coders.IASN1TypesDecoder;
28 import org.universAAL.lddi.lib.ieeex73std.org.bn.coders.IASN1TypesEncoder;
29
30
31
32
33 public class ASN1BitStringMetadata
34 extends ASN1FieldMetadata
35 {
36 public ASN1BitStringMetadata(String name)
37 {
38 super(name);
39 }
40
41 public ASN1BitStringMetadata(ASN1BitString annotation) {
42 this(annotation.name());
43 }
44
45 public int encode(IASN1TypesEncoder encoder, Object object, OutputStream stream,
46 ElementInfo elementInfo) throws Exception {
47 return encoder.encodeBitString(object, stream, elementInfo);
48 }
49
50 public DecodedObject decode(IASN1TypesDecoder decoder, DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream) throws Exception {
51 return decoder.decodeBitString(decodedTag,objectClass,elementInfo,stream);
52 }
53
54
55 }