View Javadoc

1   /*
2    Copyright 2006-2011 Abdulla Abdurakhmanov (abdulla@latestbit.com)
3    Original sources are available at www.latestbit.com
4   
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8   
9    http://www.apache.org/licenses/LICENSE-2.0
10  
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16   */
17  package org.universAAL.lddi.lib.ieeex73std.org.bn.coders;
18  
19  import java.io.OutputStream;
20  
21  import java.lang.reflect.Field;
22  
23  public interface IASN1TypesEncoder {
24      int encodeClassType(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception;
25      int encodeSequence(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception;
26      int encodeChoice(Object object, OutputStream stream, ElementInfo elementInfo)  throws Exception;
27      int encodeEnum(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception;
28      int encodeEnumItem(Object enumConstant, Class enumClass, OutputStream stream, ElementInfo elementInfo) throws Exception ;
29      int encodeBoolean(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception;
30      int encodeAny(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception ;
31      int encodeNull(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception ;
32      int encodeInteger(Object object, OutputStream steam, ElementInfo elementInfo) throws Exception ;
33      int encodeReal(Object object, OutputStream steam, ElementInfo elementInfo) throws Exception ;
34      int encodeOctetString(Object object, OutputStream steam, ElementInfo elementInfo) throws Exception ;
35      int encodeBitString(Object object, OutputStream steam, ElementInfo elementInfo) throws Exception ;
36      int encodeObjectIdentifier(Object object, OutputStream steam, ElementInfo elementInfo) throws Exception ;
37      int encodeString(Object object, OutputStream steam, ElementInfo elementInfo) throws Exception ;
38      int encodeSequenceOf(Object object, OutputStream steam, ElementInfo elementInfo) throws Exception ;   
39      int encodeElement(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception;
40      int encodeBoxedType(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception;
41      int encodePreparedElement(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception;
42      Object invokeGetterMethodForField(Field field, Object object, ElementInfo elementInfo) throws Exception;
43      boolean invokeSelectedMethodForField(Field field, Object object, ElementInfo elementInfo) throws Exception;
44  }