directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: ASN1. Minor refactorings
Date Tue, 08 Dec 2015 22:25:17 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master b33d3c7e4 -> 2df85a468


ASN1. Minor refactorings


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/2df85a46
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/2df85a46
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/2df85a46

Branch: refs/heads/master
Commit: 2df85a468c7febf3d232ba1f32a1b7be1e5d7620
Parents: b33d3c7
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Wed Dec 9 06:24:57 2015 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Wed Dec 9 06:24:57 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kerby/asn1/Asn1.java   |  10 +-
 .../java/org/apache/kerby/asn1/Asn1Binder.java  |  14 +--
 .../org/apache/kerby/asn1/Asn1Converter.java    |  40 ++++----
 .../java/org/apache/kerby/asn1/Asn1Dumper.java  |   8 +-
 .../apache/kerby/asn1/parse/Asn1Container.java  |  14 +--
 .../org/apache/kerby/asn1/parse/Asn1Item.java   |   2 +-
 .../kerby/asn1/parse/Asn1ParseResult.java       | 100 +++++++++++++++++++
 .../org/apache/kerby/asn1/parse/Asn1Parser.java |  14 +--
 .../kerby/asn1/parse/Asn1ParsingResult.java     | 100 -------------------
 .../org/apache/kerby/asn1/type/Asn1Any.java     |  12 +--
 .../apache/kerby/asn1/type/Asn1BmpString.java   |   8 +-
 .../org/apache/kerby/asn1/type/Asn1Boolean.java |   8 +-
 .../org/apache/kerby/asn1/type/Asn1Choice.java  |   4 +-
 .../kerby/asn1/type/Asn1CollectionOf.java       |   4 +-
 .../kerby/asn1/type/Asn1CollectionType.java     |  10 +-
 .../apache/kerby/asn1/type/Asn1Constructed.java |   8 +-
 .../org/apache/kerby/asn1/type/Asn1Eoc.java     |   6 +-
 .../org/apache/kerby/asn1/type/Asn1Null.java    |   6 +-
 .../org/apache/kerby/asn1/type/Asn1Object.java  |  32 +++---
 .../apache/kerby/asn1/type/Asn1OctetString.java |   6 +-
 .../org/apache/kerby/asn1/type/Asn1Simple.java  |   6 +-
 .../org/apache/kerby/asn1/type/Asn1Tagging.java |  10 +-
 .../kerby/asn1/type/Asn1TaggingCollection.java  |   6 +-
 .../apache/kerby/kerberos/kerb/KrbCodec.java    |   4 +-
 24 files changed, 216 insertions(+), 216 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1.java
index 654c781..4d4d51b 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.asn1;
 
 import org.apache.kerby.asn1.parse.Asn1Parser;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 import org.apache.kerby.asn1.type.Asn1Type;
 import org.apache.kerby.asn1.util.HexUtil;
 
@@ -50,15 +50,15 @@ public final class Asn1 {
     }
 
     public static Asn1Type decode(ByteBuffer content) throws IOException {
-        Asn1ParsingResult parsingResult = Asn1Parser.parse(content);
-        return Asn1Converter.convert(parsingResult);
+        Asn1ParseResult parseResult = Asn1Parser.parse(content);
+        return Asn1Converter.convert(parseResult);
     }
 
-    public static Asn1ParsingResult parse(byte[] content) throws IOException {
+    public static Asn1ParseResult parse(byte[] content) throws IOException {
         return parse(ByteBuffer.wrap(content));
     }
 
-    public static Asn1ParsingResult parse(ByteBuffer content) throws IOException {
+    public static Asn1ParseResult parse(ByteBuffer content) throws IOException {
         return Asn1Parser.parse(content);
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Binder.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Binder.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Binder.java
index b258263..79c4db4 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Binder.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Binder.java
@@ -1,6 +1,6 @@
 package org.apache.kerby.asn1;
 
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 import org.apache.kerby.asn1.type.Asn1Object;
 import org.apache.kerby.asn1.type.Asn1Type;
 
@@ -15,18 +15,18 @@ public final class Asn1Binder {
 
     }
 
-    public static void bind(Asn1ParsingResult parsingResult,
+    public static void bind(Asn1ParseResult parseResult,
                             Asn1Type value) throws IOException {
-        value.useDefinitiveLength(parsingResult.isDefinitiveLength());
-        ((Asn1Object) value).decode(parsingResult);
+        value.useDefinitiveLength(parseResult.isDefinitiveLength());
+        ((Asn1Object) value).decode(parseResult);
     }
 
-    public static void bindWithTagging(Asn1ParsingResult parsingResult,
+    public static void bindWithTagging(Asn1ParseResult parseResult,
                                        Asn1Type value, TaggingOption taggingOption) throws
IOException {
-        if (!parsingResult.isTagSpecific()) {
+        if (!parseResult.isTagSpecific()) {
             throw new IllegalArgumentException(
                 "Attempting to decode non-tagged value using tagging way");
         }
-        ((Asn1Object) value).taggedDecode(parsingResult, taggingOption);
+        ((Asn1Object) value).taggedDecode(parseResult, taggingOption);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Converter.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Converter.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Converter.java
index e9f92e6..89af899 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Converter.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Converter.java
@@ -19,7 +19,7 @@
  */
 package org.apache.kerby.asn1;
 
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 import org.apache.kerby.asn1.type.Asn1Collection;
 import org.apache.kerby.asn1.type.Asn1Constructed;
 import org.apache.kerby.asn1.type.Asn1Object;
@@ -37,36 +37,36 @@ public final class Asn1Converter {
 
     }
 
-    public static Asn1Type convert(Asn1ParsingResult parsingResult) throws IOException {
-        if (Asn1Simple.isSimple(parsingResult.tag())) {
-            return Asn1Converter.convertAsSimple(parsingResult);
-        } else if (Asn1Collection.isCollection(parsingResult.tag())) {
-            return Asn1Converter.convertAsCollection(parsingResult);
-        } else if (!parsingResult.tag().isPrimitive()) {
-            Asn1Object tmpValue = new Asn1Constructed(parsingResult.tag());
-            tmpValue.decode(parsingResult);
+    public static Asn1Type convert(Asn1ParseResult parseResult) throws IOException {
+        if (Asn1Simple.isSimple(parseResult.tag())) {
+            return Asn1Converter.convertAsSimple(parseResult);
+        } else if (Asn1Collection.isCollection(parseResult.tag())) {
+            return Asn1Converter.convertAsCollection(parseResult);
+        } else if (!parseResult.tag().isPrimitive()) {
+            Asn1Object tmpValue = new Asn1Constructed(parseResult.tag());
+            tmpValue.decode(parseResult);
             return tmpValue;
         } else {
-            throw new IOException("Unknow type of tag=" + parsingResult.tag());
+            throw new IOException("Unknow type of tag=" + parseResult.tag());
         }
     }
 
-    public static Asn1Type convertAsSimple(Asn1ParsingResult parsingResult) throws IOException
{
-        Asn1Object value = (Asn1Object) Asn1Simple.createSimple(parsingResult.tagNo());
-        value.useDefinitiveLength(parsingResult.isDefinitiveLength());
-        Asn1Binder.bind(parsingResult, value);
+    public static Asn1Type convertAsSimple(Asn1ParseResult parseResult) throws IOException
{
+        Asn1Object value = (Asn1Object) Asn1Simple.createSimple(parseResult.tagNo());
+        value.useDefinitiveLength(parseResult.isDefinitiveLength());
+        Asn1Binder.bind(parseResult, value);
         return value;
     }
 
-    public static Asn1Type convertAsCollection(Asn1ParsingResult parsingResult) throws IOException
{
-        Asn1Collection value = Asn1Collection.createCollection(parsingResult.tag());
-        value.useDefinitiveLength(parsingResult.isDefinitiveLength());
+    public static Asn1Type convertAsCollection(Asn1ParseResult parseResult) throws IOException
{
+        Asn1Collection value = Asn1Collection.createCollection(parseResult.tag());
+        value.useDefinitiveLength(parseResult.isDefinitiveLength());
         value.setLazy(true);
-        Asn1Binder.bind(parsingResult, value);
+        Asn1Binder.bind(parseResult, value);
         return value;
     }
 
-    public static Asn1Type convertAs(Asn1ParsingResult parsingResult,
+    public static Asn1Type convertAs(Asn1ParseResult parseResult,
                                      Class<? extends Asn1Type> type) throws IOException
{
         Asn1Type value;
         try {
@@ -75,7 +75,7 @@ public final class Asn1Converter {
             throw new RuntimeException("Invalid type: "
                 + type.getCanonicalName(), e);
         }
-        Asn1Binder.bind(parsingResult, value);
+        Asn1Binder.bind(parseResult, value);
         return value;
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Dumper.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Dumper.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Dumper.java
index 099e2e0..27dcb08 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Dumper.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/Asn1Dumper.java
@@ -21,7 +21,7 @@ package org.apache.kerby.asn1;
 
 import org.apache.kerby.asn1.parse.Asn1Item;
 import org.apache.kerby.asn1.parse.Asn1Parser;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 import org.apache.kerby.asn1.type.Asn1Any;
 import org.apache.kerby.asn1.type.Asn1Simple;
 import org.apache.kerby.asn1.type.Asn1Type;
@@ -66,8 +66,8 @@ public final class Asn1Dumper {
     public void dump(ByteBuffer content,
                      boolean useRawFormat) throws IOException {
         if (useRawFormat) {
-            Asn1ParsingResult parsingResult = Asn1Parser.parse(content);
-            dumpParseResult(0, parsingResult);
+            Asn1ParseResult parseResult = Asn1Parser.parse(content);
+            dumpParseResult(0, parseResult);
         } else {
             Asn1Type value = Asn1.decode(content);
             dumpType(0, value);
@@ -97,7 +97,7 @@ public final class Asn1Dumper {
         return this;
     }
 
-    public Asn1Dumper dumpParseResult(int indents, Asn1ParsingResult value) {
+    public Asn1Dumper dumpParseResult(int indents, Asn1ParseResult value) {
         if (value == null) {
             indent(indents).append("Null");
         } else if (value instanceof Asn1Item) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java
index 1e796ec..311f01e 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java
@@ -29,23 +29,23 @@ import java.util.List;
  * ASN1 constructed types, mainly structured ones, but also some primitive ones.
  */
 public class Asn1Container
-    extends Asn1ParsingResult implements Asn1Dumpable {
+    extends Asn1ParseResult implements Asn1Dumpable {
 
-    private List<Asn1ParsingResult> children = new ArrayList<>();
+    private List<Asn1ParseResult> children = new ArrayList<>();
 
     public Asn1Container(Asn1Header header) {
         super(header);
     }
 
-    public Asn1Container(Asn1ParsingResult parsingResult) {
-        super(parsingResult.header);
+    public Asn1Container(Asn1ParseResult parseResult) {
+        super(parseResult.header);
     }
 
-    public List<Asn1ParsingResult> getChildren() {
+    public List<Asn1ParseResult> getChildren() {
         return children;
     }
 
-    public void addItem(Asn1ParsingResult value) {
+    public void addItem(Asn1ParseResult value) {
         children.add(value);
     }
 
@@ -57,7 +57,7 @@ public class Asn1Container
     public void dumpWith(Asn1Dumper dumper, int indents) {
         dumper.indent(indents).append(toString()).newLine();
 
-        for (Asn1ParsingResult aObj : children) {
+        for (Asn1ParseResult aObj : children) {
             dumper.dumpParseResult(indents + 4, aObj).newLine();
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Item.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Item.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Item.java
index b1f0ef9..2e2722d 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Item.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Item.java
@@ -19,7 +19,7 @@
  */
 package org.apache.kerby.asn1.parse;
 
-public class Asn1Item extends Asn1ParsingResult {
+public class Asn1Item extends Asn1ParseResult {
 
     public Asn1Item(Asn1Header header) {
         super(header);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java
new file mode 100644
index 0000000..f29c12c
--- /dev/null
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java
@@ -0,0 +1,100 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.kerby.asn1.parse;
+
+import org.apache.kerby.asn1.Tag;
+import org.apache.kerby.asn1.util.Asn1Util;
+
+import java.nio.ByteBuffer;
+
+public abstract class Asn1ParseResult {
+    protected Asn1Header header;
+
+    public Asn1ParseResult(Asn1Header header) {
+        this.header = header;
+    }
+
+    public Tag tag() {
+        return header.getTag();
+    }
+
+    public int tagNo() {
+        return tag().tagNo();
+    }
+
+    public boolean isPrimitive() {
+        return tag().isPrimitive();
+    }
+
+    public boolean isUniversal() {
+        return tag().isUniversal();
+    }
+
+    public boolean isAppSpecific() {
+        return tag().isAppSpecific();
+    }
+
+    public boolean isContextSpecific() {
+        return tag().isContextSpecific();
+    }
+
+    public boolean isTagSpecific() {
+        return tag().isSpecific();
+    }
+
+    public boolean isEOC() {
+        return header.isEOC();
+    }
+
+    public Asn1Header getHeader() {
+        return header;
+    }
+
+    public boolean isDefinitiveLength() {
+        return header.isDefinitiveLength();
+    }
+
+    public int getAllLength() {
+        return getHeaderLength() + getBodyLength();
+    }
+
+    public int getHeaderLength() {
+        int bodyLen = getBodyLength();
+        int headerLen = Asn1Util.lengthOfTagLength(header.getTag().tagNo());
+        headerLen += (header.isDefinitiveLength()
+            ? Asn1Util.lengthOfBodyLength(bodyLen) : 1);
+        return headerLen;
+    }
+
+    public int getBodyLength() {
+        return header.getActualBodyLength();
+    }
+
+    protected int getOffset() {
+        return header.getBodyStart() - getHeaderLength();
+    }
+
+    public byte[] readBodyBytes() {
+        ByteBuffer bodyBuffer = header.getBodyBuffer();
+        byte[] result = new byte[bodyBuffer.remaining()];
+        bodyBuffer.get(result);
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Parser.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Parser.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Parser.java
index 9c79768..c81c8c1 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Parser.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Parser.java
@@ -39,7 +39,7 @@ public class Asn1Parser {
         int pos = header.getBodyStart();
         while (true) {
             reader.setPosition(pos);
-            Asn1ParsingResult asn1Obj = parse(reader);
+            Asn1ParseResult asn1Obj = parse(reader);
             if (asn1Obj == null) {
                 break;
             }
@@ -61,28 +61,28 @@ public class Asn1Parser {
         header.setBodyEnd(pos);
     }
 
-    public static Asn1ParsingResult parse(ByteBuffer content) throws IOException {
+    public static Asn1ParseResult parse(ByteBuffer content) throws IOException {
         Asn1Reader reader = new Asn1Reader(content);
         return parse(reader);
     }
 
-    public static Asn1ParsingResult parse(Asn1Reader reader) throws IOException {
+    public static Asn1ParseResult parse(Asn1Reader reader) throws IOException {
         if (!reader.available()) {
             return null;
         }
 
         Asn1Header header = reader.readHeader();
         Tag tmpTag = header.getTag();
-        Asn1ParsingResult parsingResult;
+        Asn1ParseResult parseResult;
 
         if (tmpTag.isPrimitive()) {
-            parsingResult = new Asn1Item(header);
+            parseResult = new Asn1Item(header);
         } else {
             Asn1Container container = new Asn1Container(header);
             parse(container);
-            parsingResult = container;
+            parseResult = container;
         }
 
-        return parsingResult;
+        return parseResult;
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParsingResult.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParsingResult.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParsingResult.java
deleted file mode 100644
index 7be817f..0000000
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParsingResult.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.kerby.asn1.parse;
-
-import org.apache.kerby.asn1.Tag;
-import org.apache.kerby.asn1.util.Asn1Util;
-
-import java.nio.ByteBuffer;
-
-public abstract class Asn1ParsingResult {
-    protected Asn1Header header;
-
-    public Asn1ParsingResult(Asn1Header header) {
-        this.header = header;
-    }
-
-    public Tag tag() {
-        return header.getTag();
-    }
-
-    public int tagNo() {
-        return tag().tagNo();
-    }
-
-    public boolean isPrimitive() {
-        return tag().isPrimitive();
-    }
-
-    public boolean isUniversal() {
-        return tag().isUniversal();
-    }
-
-    public boolean isAppSpecific() {
-        return tag().isAppSpecific();
-    }
-
-    public boolean isContextSpecific() {
-        return tag().isContextSpecific();
-    }
-
-    public boolean isTagSpecific() {
-        return tag().isSpecific();
-    }
-
-    public boolean isEOC() {
-        return header.isEOC();
-    }
-
-    public Asn1Header getHeader() {
-        return header;
-    }
-
-    public boolean isDefinitiveLength() {
-        return header.isDefinitiveLength();
-    }
-
-    public int getAllLength() {
-        return getHeaderLength() + getBodyLength();
-    }
-
-    public int getHeaderLength() {
-        int bodyLen = getBodyLength();
-        int headerLen = Asn1Util.lengthOfTagLength(header.getTag().tagNo());
-        headerLen += (header.isDefinitiveLength()
-            ? Asn1Util.lengthOfBodyLength(bodyLen) : 1);
-        return headerLen;
-    }
-
-    public int getBodyLength() {
-        return header.getActualBodyLength();
-    }
-
-    protected int getOffset() {
-        return header.getBodyStart() - getHeaderLength();
-    }
-
-    public byte[] readBodyBytes() {
-        ByteBuffer bodyBuffer = header.getBodyBuffer();
-        byte[] result = new byte[bodyBuffer.remaining()];
-        bodyBuffer.get(result);
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Any.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Any.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Any.java
index 23fa9a6..3bce491 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Any.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Any.java
@@ -22,7 +22,7 @@ package org.apache.kerby.asn1.type;
 import org.apache.kerby.asn1.Asn1Binder;
 import org.apache.kerby.asn1.Asn1FieldInfo;
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -32,7 +32,7 @@ import java.nio.ByteBuffer;
  */
 public class Asn1Any extends AbstractAsn1Type<Asn1Type> {
     private Asn1FieldInfo fieldInfo;
-    private Asn1ParsingResult field;
+    private Asn1ParseResult field;
 
     public Asn1Any() {
         super(UniversalTag.ANY);
@@ -43,7 +43,7 @@ public class Asn1Any extends AbstractAsn1Type<Asn1Type> {
         setValue(anyValue);
     }
 
-    public void setField(Asn1ParsingResult field) {
+    public void setField(Asn1ParseResult field) {
         this.field = field;
     }
 
@@ -51,7 +51,7 @@ public class Asn1Any extends AbstractAsn1Type<Asn1Type> {
         this.fieldInfo = fieldInfo;
     }
 
-    public Asn1ParsingResult getField() {
+    public Asn1ParseResult getField() {
         return field;
     }
 
@@ -61,8 +61,8 @@ public class Asn1Any extends AbstractAsn1Type<Asn1Type> {
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        ((Asn1Object) getValue()).decodeBody(parsingResult);
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        ((Asn1Object) getValue()).decodeBody(parseResult);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1BmpString.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1BmpString.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1BmpString.java
index 929b989..294649e 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1BmpString.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1BmpString.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.asn1.type;
 
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 
@@ -61,10 +61,10 @@ public class Asn1BmpString extends Asn1Simple<String> {
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        if (parsingResult.getBodyLength() % 2 != 0) {
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        if (parseResult.getBodyLength() % 2 != 0) {
             throw new IOException("Bad stream, BMP string expecting multiple of 2 bytes");
         }
-        super.decodeBody(parsingResult);
+        super.decodeBody(parseResult);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Boolean.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Boolean.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Boolean.java
index af2cc4e..9679783 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Boolean.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Boolean.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.asn1.type;
 
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 
@@ -55,11 +55,11 @@ public class Asn1Boolean extends Asn1Simple<Boolean> {
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        if (parsingResult.getBodyLength() != 1) {
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        if (parseResult.getBodyLength() != 1) {
             throw new IOException("More than 1 byte found for Boolean");
         }
-        super.decodeBody(parsingResult);
+        super.decodeBody(parseResult);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Choice.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Choice.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Choice.java
index b6cd961..c6d9d40 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Choice.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Choice.java
@@ -23,7 +23,7 @@ import org.apache.kerby.asn1.Asn1FieldInfo;
 import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.TaggingOption;
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -111,7 +111,7 @@ public class Asn1Choice extends AbstractAsn1Type<Asn1Type> {
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
 
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionOf.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionOf.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionOf.java
index c1d347c..edc2562 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionOf.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionOf.java
@@ -22,7 +22,7 @@ package org.apache.kerby.asn1.type;
 import org.apache.kerby.asn1.Asn1Binder;
 import org.apache.kerby.asn1.Asn1Dumper;
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 import java.lang.reflect.ParameterizedType;
@@ -37,7 +37,7 @@ public abstract class Asn1CollectionOf<T extends Asn1Type>
 
     @Override
     protected void decodeElements() throws IOException {
-        for (Asn1ParsingResult parsingItem : getContainer().getChildren()) {
+        for (Asn1ParseResult parsingItem : getContainer().getChildren()) {
             if (parsingItem.isEOC()) {
                 continue;
             }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java
index a789b0c..8ce0f69 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java
@@ -27,7 +27,7 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.TaggingOption;
 import org.apache.kerby.asn1.UniversalTag;
 import org.apache.kerby.asn1.parse.Asn1Container;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -84,15 +84,15 @@ public abstract class Asn1CollectionType
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
         checkAndInitFields();
 
-        Asn1Container container = (Asn1Container) parsingResult;
-        List<Asn1ParsingResult> parsingResults = container.getChildren();
+        Asn1Container container = (Asn1Container) parseResult;
+        List<Asn1ParseResult> parseResults = container.getChildren();
 
         int lastPos = -1, foundPos = -1;
 
-        for (Asn1ParsingResult parsingItem : parsingResults) {
+        for (Asn1ParseResult parsingItem : parseResults) {
             if (parsingItem.isEOC()) {
                 continue;
             }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Constructed.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Constructed.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Constructed.java
index aedf113..ddbc75f 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Constructed.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Constructed.java
@@ -24,7 +24,7 @@ import org.apache.kerby.asn1.Asn1Dumpable;
 import org.apache.kerby.asn1.Asn1Dumper;
 import org.apache.kerby.asn1.Tag;
 import org.apache.kerby.asn1.parse.Asn1Container;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -91,8 +91,8 @@ public class Asn1Constructed
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        Asn1Container container = (Asn1Container) parsingResult;
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        Asn1Container container = (Asn1Container) parseResult;
         this.container = container;
 
         if (!isLazy()) {
@@ -101,7 +101,7 @@ public class Asn1Constructed
     }
 
     protected void decodeElements() throws IOException {
-        for (Asn1ParsingResult parsingItem : getContainer().getChildren()) {
+        for (Asn1ParseResult parsingItem : getContainer().getChildren()) {
             if (parsingItem.isEOC()) {
                 continue;
             }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Eoc.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Eoc.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Eoc.java
index ec8c280..d21801d 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Eoc.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Eoc.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.asn1.type;
 
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 
@@ -46,8 +46,8 @@ public final class Asn1Eoc extends Asn1Simple<Object> {
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        if (parsingResult.getBodyLength() != 0) {
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        if (parseResult.getBodyLength() != 0) {
             throw new IOException("Unexpected bytes found for EOC");
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Null.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Null.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Null.java
index 87a80b8..8e6ea3b 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Null.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Null.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.asn1.type;
 
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 
@@ -46,8 +46,8 @@ public final class Asn1Null extends Asn1Simple<Object> {
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        if (parsingResult.getHeader().getLength() != 0) {
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        if (parseResult.getHeader().getLength() != 0) {
             throw new IOException("Unexpected bytes found for NULL");
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java
index 5bb9854..d4c5ba5 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java
@@ -24,7 +24,7 @@ import org.apache.kerby.asn1.TaggingOption;
 import org.apache.kerby.asn1.UniversalTag;
 import org.apache.kerby.asn1.parse.Asn1Container;
 import org.apache.kerby.asn1.parse.Asn1Parser;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 import org.apache.kerby.asn1.util.Asn1Util;
 
 import java.io.IOException;
@@ -215,20 +215,20 @@ public abstract class Asn1Object implements Asn1Type {
 
     @Override
     public void decode(ByteBuffer content) throws IOException {
-        Asn1ParsingResult parsingResult = Asn1Parser.parse(content);
-        decode(parsingResult);
+        Asn1ParseResult parseResult = Asn1Parser.parse(content);
+        decode(parseResult);
     }
 
-    public void decode(Asn1ParsingResult parsingResult) throws IOException {
-        if (!tag().equals(parsingResult.tag())) {
-            throw new IOException("Unexpected tag " + parsingResult.tag()
+    public void decode(Asn1ParseResult parseResult) throws IOException {
+        if (!tag().equals(parseResult.tag())) {
+            throw new IOException("Unexpected tag " + parseResult.tag()
                 + ", expecting " + tag());
         }
 
-        decodeBody(parsingResult);
+        decodeBody(parseResult);
     }
 
-    protected abstract void decodeBody(Asn1ParsingResult parsingResult) throws IOException;
+    protected abstract void decodeBody(Asn1ParseResult parseResult) throws IOException;
 
     protected int taggedEncodingLength(TaggingOption taggingOption) {
         int taggingTagNo = taggingOption.getTagNo();
@@ -271,23 +271,23 @@ public abstract class Asn1Object implements Asn1Type {
     @Override
     public void taggedDecode(ByteBuffer content,
                              TaggingOption taggingOption) throws IOException {
-        Asn1ParsingResult parsingResult = Asn1Parser.parse(content);
-        taggedDecode(parsingResult, taggingOption);
+        Asn1ParseResult parseResult = Asn1Parser.parse(content);
+        taggedDecode(parseResult, taggingOption);
     }
 
-    public void taggedDecode(Asn1ParsingResult parsingResult,
+    public void taggedDecode(Asn1ParseResult parseResult,
                                 TaggingOption taggingOption) throws IOException {
         Tag expectedTaggingTagFlags = taggingOption.getTag(!isPrimitive());
-        if (!expectedTaggingTagFlags.equals(parsingResult.tag())) {
-            throw new IOException("Unexpected tag " + parsingResult.tag()
+        if (!expectedTaggingTagFlags.equals(parseResult.tag())) {
+            throw new IOException("Unexpected tag " + parseResult.tag()
                     + ", expecting " + expectedTaggingTagFlags);
         }
 
         if (taggingOption.isImplicit()) {
-            decodeBody(parsingResult);
+            decodeBody(parseResult);
         } else {
-            Asn1Container container = (Asn1Container) parsingResult;
-            Asn1ParsingResult body = container.getChildren().get(0);
+            Asn1Container container = (Asn1Container) parseResult;
+            Asn1ParseResult body = container.getChildren().get(0);
             decode(body);
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1OctetString.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1OctetString.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1OctetString.java
index 3b91459..78cb1ff 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1OctetString.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1OctetString.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.asn1.type;
 
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 
@@ -44,8 +44,8 @@ public class Asn1OctetString extends Asn1Simple<byte[]> {
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        setValue(parsingResult.readBodyBytes());
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        setValue(parseResult.readBodyBytes());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Simple.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Simple.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Simple.java
index 1472bc6..0cda770 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Simple.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Simple.java
@@ -21,7 +21,7 @@ package org.apache.kerby.asn1.type;
 
 import org.apache.kerby.asn1.Tag;
 import org.apache.kerby.asn1.UniversalTag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 import org.apache.kerby.asn1.util.Asn1Util;
 
 import java.io.IOException;
@@ -93,8 +93,8 @@ public abstract class Asn1Simple<T> extends AbstractAsn1Type<T>
{
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        byte[] leftBytes = parsingResult.readBodyBytes();
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        byte[] leftBytes = parseResult.readBodyBytes();
         if (leftBytes.length > 0) {
             setBytes(leftBytes);
             toValue();

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Tagging.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Tagging.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Tagging.java
index 4a5bddd..f9b9eb3 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Tagging.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Tagging.java
@@ -23,7 +23,7 @@ import org.apache.kerby.asn1.Asn1Dumpable;
 import org.apache.kerby.asn1.Asn1Dumper;
 import org.apache.kerby.asn1.Tag;
 import org.apache.kerby.asn1.parse.Asn1Container;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 import java.lang.reflect.ParameterizedType;
@@ -82,13 +82,13 @@ public class Asn1Tagging<T extends Asn1Type>
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
         Asn1Object value = (Asn1Object) getValue();
         if (isImplicit()) {
-            value.decodeBody(parsingResult);
+            value.decodeBody(parseResult);
         } else {
-            Asn1Container container = (Asn1Container) parsingResult;
-            Asn1ParsingResult body = container.getChildren().get(0);
+            Asn1Container container = (Asn1Container) parseResult;
+            Asn1ParseResult body = container.getChildren().get(0);
             value.decode(body);
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1TaggingCollection.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1TaggingCollection.java
b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1TaggingCollection.java
index 27e0898..9cdfc04 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1TaggingCollection.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1TaggingCollection.java
@@ -24,7 +24,7 @@ import org.apache.kerby.asn1.Asn1Dumper;
 import org.apache.kerby.asn1.Asn1FieldInfo;
 import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.Tag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -141,8 +141,8 @@ public abstract class Asn1TaggingCollection
     }
 
     @Override
-    protected void decodeBody(Asn1ParsingResult parsingResult) throws IOException {
-        tagging.decodeBody(parsingResult);
+    protected void decodeBody(Asn1ParseResult parseResult) throws IOException {
+        tagging.decodeBody(parseResult);
     }
 
     protected <T extends Asn1Type> T getFieldAs(EnumType index, Class<T> t) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2df85a46/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/KrbCodec.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/KrbCodec.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/KrbCodec.java
index 4693d05..fb6e480 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/KrbCodec.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/KrbCodec.java
@@ -21,7 +21,7 @@ package org.apache.kerby.kerberos.kerb;
 
 import org.apache.kerby.asn1.Asn1;
 import org.apache.kerby.asn1.Tag;
-import org.apache.kerby.asn1.parse.Asn1ParsingResult;
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 import org.apache.kerby.asn1.type.Asn1Type;
 import org.apache.kerby.kerberos.kerb.type.ap.ApReq;
 import org.apache.kerby.kerberos.kerb.type.base.KrbError;
@@ -65,7 +65,7 @@ public class KrbCodec {
     }
 
     public static KrbMessage decodeMessage(ByteBuffer buffer) throws IOException {
-        Asn1ParsingResult parsingResult = Asn1.parse(buffer);
+        Asn1ParseResult parsingResult = Asn1.parse(buffer);
         Tag tag = parsingResult.tag();
 
         KrbMessage msg;


Mime
View raw message