src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java

Print this page

        

@@ -1,33 +1,34 @@
 /*
  * reserved comment block
  * DO NOT REMOVE OR ALTER!
  */
-/*
- * Copyright  1999-2008 The Apache Software Foundation.
- *
- *  Licensed 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
+/**
+ * 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.
- *
+ * 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 com.sun.org.apache.xml.internal.security.signature;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 

@@ -51,163 +52,130 @@
  * Class XMLSignatureInput
  *
  * @author Christian Geuer-Pollmann
  * $todo$ check whether an XMLSignatureInput can be _both_, octet stream _and_ node set?
  */
-public class XMLSignatureInput implements Cloneable {
-    static java.util.logging.Logger log =
-        java.util.logging.Logger.getLogger
-            (XMLSignatureInput.class.getName());
-
+public class XMLSignatureInput {
     /*
      * The XMLSignature Input can be either:
      *   A byteArray like with/or without InputStream.
      *   Or a nodeSet like defined either:
      *       * as a collection of nodes
-     *       * or as subnode excluding or not commets and excluding or
+     *       * or as subnode excluding or not comments and excluding or 
      *         not other nodes.
      */
 
     /**
      * Some InputStreams do not support the {@link java.io.InputStream#reset}
      * method, so we read it in completely and work on our Proxy.
      */
-    InputStream _inputOctetStreamProxy = null;
+    private InputStream inputOctetStreamProxy = null;
     /**
      * The original NodeSet for this XMLSignatureInput
      */
-    Set<Node> _inputNodeSet = null;
+    private Set<Node> inputNodeSet = null;
     /**
      * The original Element
      */
-    Node _subNode=null;
+    private Node subNode = null;
     /**
      * Exclude Node *for enveloped transformations*
      */
-    Node excludeNode=null;
+    private Node excludeNode = null;
     /**
      *
      */
-    boolean excludeComments=false;
+    private boolean excludeComments = false;
 
-    boolean isNodeSet=false;
+    private boolean isNodeSet = false;
     /**
      * A cached bytes
      */
-    byte []bytes=null;
+    private byte[] bytes = null;
 
     /**
-     * Some Transforms may require explicit MIME type, charset (IANA registered "character set"), or other such information concerning the data they are receiving from an earlier Transform or the source data, although no Transform algorithm specified in this document needs such explicit information. Such data characteristics are provided as parameters to the Transform algorithm and should be described in the specification for the algorithm.
+     * Some Transforms may require explicit MIME type, charset (IANA registered
+     * "character set"), or other such information concerning the data they are
+     * receiving from an earlier Transform or the source data, although no 
+     * Transform algorithm specified in this document needs such explicit 
+     * information. Such data characteristics are provided as parameters to the 
+     * Transform algorithm and should be described in the specification for the 
+     * algorithm.
      */
-    private String _MIMEType = null;
+    private String mimeType = null;
 
     /**
-     * Field _SourceURI
+     * Field sourceURI 
      */
-    private String _SourceURI = null;
+    private String sourceURI = null;
 
     /**
      * Node Filter list.
      */
-    List<NodeFilter> nodeFilters=new ArrayList<NodeFilter>();
+    private List<NodeFilter> nodeFilters = new ArrayList<NodeFilter>();
 
-    boolean needsToBeExpanded=false;
-    OutputStream outputStream=null;
-
-    /**
-     * Check if the structured is needed to be circumbented.
-     * @return true if so.
-     */
-    public boolean isNeedsToBeExpanded() {
-        return needsToBeExpanded;
-    }
+    private boolean needsToBeExpanded = false;
+    private OutputStream outputStream = null;
 
-    /**
-     * Set if the structured is needed to be circumbented.
-     * @param needsToBeExpanded true if so.
-     */
-    public void setNeedsToBeExpanded(boolean needsToBeExpanded) {
-        this.needsToBeExpanded = needsToBeExpanded;
-    }
+    private DocumentBuilderFactory dfactory;
 
     /**
      * Construct a XMLSignatureInput from an octet array.
      * <p>
      * This is a comfort method, which internally converts the byte[] array into
      * an InputStream
      * <p>NOTE: no defensive copy</p>
      * @param inputOctets an octet array which including XML document or node
      */
     public XMLSignatureInput(byte[] inputOctets) {
-
         // NO  defensive copy
-
-        //this._inputOctetStreamProxy = new ByteArrayInputStream(inputOctets);
-        this.bytes=inputOctets;
+        this.bytes = inputOctets;
     }
 
     /**
      * Constructs a <code>XMLSignatureInput</code> from an octet stream. The
      * stream is directly read.
      *
      * @param inputOctetStream
      */
     public XMLSignatureInput(InputStream inputOctetStream)  {
-        this._inputOctetStreamProxy=inputOctetStream;
-
-        //this(JavaUtils.getBytesFromStream(inputOctetStream));
-    }
-
-    /**
-     * Construct a XMLSignatureInput from a String.
-     * <p>
-     * This is a comfort method, which internally converts the String into a byte
-     * [] array using the {@link java.lang.String#getBytes()} method.
-     * @deprecated
-     * @param inputStr the input String which including XML document or node
-     */
-    @Deprecated
-    public XMLSignatureInput(String inputStr) {
-        this(inputStr.getBytes());
-    }
-
-    /**
-     * Construct a XMLSignatureInput from a String with a given encoding.
-     * <p>
-     * This is a comfort method, which internally converts the String into a byte
-     * [] array using the {@link java.lang.String#getBytes()} method.
-     *
-     * @deprecated
-     * @param inputStr the input String with encoding <code>encoding</code>
-     * @param encoding the encoding of <code>inputStr</code>
-     * @throws UnsupportedEncodingException
-     */
-    @Deprecated
-    public XMLSignatureInput(String inputStr, String encoding)
-           throws UnsupportedEncodingException {
-        this(inputStr.getBytes(encoding));
+        this.inputOctetStreamProxy = inputOctetStream;
     }
 
     /**
      * Construct a XMLSignatureInput from a subtree rooted by rootNode. This
      * method included the node and <I>all</I> his descendants in the output.
      *
      * @param rootNode
      */
-    public XMLSignatureInput(Node rootNode)
-    {
-        this._subNode = rootNode;
+    public XMLSignatureInput(Node rootNode) {
+        this.subNode = rootNode;
     }
 
     /**
      * Constructor XMLSignatureInput
      *
      * @param inputNodeSet
-     * @param usedXPathAPI
      */
     public XMLSignatureInput(Set<Node> inputNodeSet) {
-        this._inputNodeSet = inputNodeSet;
+        this.inputNodeSet = inputNodeSet;
+    }
+
+    /**
+     * Check if the structure needs to be expanded.
+     * @return true if so.
+     */
+    public boolean isNeedsToBeExpanded() {
+        return needsToBeExpanded;
+    }
+   
+    /**
+     * Set if the structure needs to be expanded.
+     * @param needsToBeExpanded true if so.
+     */
+    public void setNeedsToBeExpanded(boolean needsToBeExpanded) {
+        this.needsToBeExpanded = needsToBeExpanded;
     }
 
     /**
      * Returns the node set from input which was specified as the parameter of
      * {@link XMLSignatureInput} constructor

@@ -216,71 +184,82 @@
      * @throws SAXException
      * @throws IOException
      * @throws ParserConfigurationException
      * @throws CanonicalizationException
      */
-    public Set<Node> getNodeSet() throws CanonicalizationException,
-        ParserConfigurationException, IOException, SAXException {
+    public Set<Node> getNodeSet() throws CanonicalizationException, ParserConfigurationException, 
+        IOException, SAXException {
         return getNodeSet(false);
     }
 
     /**
+     * Get the Input NodeSet.
+     * @return the Input NodeSet.
+     */
+    public Set<Node> getInputNodeSet() {
+        return inputNodeSet;
+    }
+
+    /**
      * Returns the node set from input which was specified as the parameter of
      * {@link XMLSignatureInput} constructor
      * @param circumvent
      *
      * @return the node set
      * @throws SAXException
      * @throws IOException
      * @throws ParserConfigurationException
      * @throws CanonicalizationException
      */
-    public Set<Node> getNodeSet(boolean circumvent)
-           throws ParserConfigurationException, IOException, SAXException,
-                  CanonicalizationException {
-        if (this._inputNodeSet!=null) {
-            return this._inputNodeSet;
+    public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException,
+        IOException, SAXException, CanonicalizationException {
+        if (inputNodeSet != null) {
+            return inputNodeSet;
         }
-        if ((this._inputOctetStreamProxy==null)&& (this._subNode!=null) ) {
-
+        if (inputOctetStreamProxy == null && subNode != null) {
             if (circumvent) {
-                XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(_subNode));
+                XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(subNode));
             }
-            this._inputNodeSet = new LinkedHashSet<Node>();
-            XMLUtils.getSet(_subNode,this._inputNodeSet, excludeNode, this.excludeComments);
-
-            return this._inputNodeSet;
-        } else if (this.isOctetStream()) {
+            inputNodeSet = new LinkedHashSet<Node>();
+            XMLUtils.getSet(subNode, inputNodeSet, excludeNode, excludeComments);
+            return inputNodeSet;
+        } else if (isOctetStream()) {
             convertToNodes();
-            LinkedHashSet<Node> result = new LinkedHashSet<Node>();
-            XMLUtils.getSet(_subNode, result,null,false);
-            //this._inputNodeSet=result;
+            Set<Node> result = new LinkedHashSet<Node>();
+            XMLUtils.getSet(subNode, result, null, false); 
             return result;
         }
 
-        throw new RuntimeException(
-            "getNodeSet() called but no input data present");
+        throw new RuntimeException("getNodeSet() called but no input data present");
     }
 
     /**
-     * Returns the Octect stream(byte Stream) from input which was specified as
+     * Returns the Octet stream(byte Stream) from input which was specified as 
      * the parameter of {@link XMLSignatureInput} constructor
      *
-     * @return the Octect stream(byte Stream) from input which was specified as
+     * @return the Octet stream(byte Stream) from input which was specified as 
      * the parameter of {@link XMLSignatureInput} constructor
      * @throws IOException
      */
     public InputStream getOctetStream() throws IOException  {
+        if (inputOctetStreamProxy != null) {
+            return inputOctetStreamProxy;
+        }
+
+        if (bytes != null) {
+            inputOctetStreamProxy = new ByteArrayInputStream(bytes);
+            return inputOctetStreamProxy;
+        }
 
-        return getResetableInputStream();
+        return null;
     }
 
     /**
-     * @return real octect stream
+     * @return real octet stream
      */
-    public InputStream getOctetStreamReal () {
-        return this._inputOctetStreamProxy;
+    public InputStream getOctetStreamReal() {
+        return inputOctetStreamProxy;
     }
 
     /**
      * Returns the byte array from input which was specified as the parameter of
      * {@link XMLSignatureInput} constructor

@@ -290,56 +269,47 @@
      *
      * @throws CanonicalizationException
      * @throws IOException
      */
     public byte[] getBytes() throws IOException, CanonicalizationException {
-        if (bytes!=null) {
-            return bytes;
-        }
-        InputStream is = getResetableInputStream();
-        if (is!=null) {
-            //resetable can read again bytes.
-            if (bytes==null) {
-                is.reset();
-                bytes=JavaUtils.getBytesFromStream(is);
-            }
-            return bytes;
+        byte[] inputBytes = getBytesFromInputStream();
+        if (inputBytes != null) {
+            return inputBytes;
         }
-        Canonicalizer20010315OmitComments c14nizer =
-                new Canonicalizer20010315OmitComments();
-        bytes=c14nizer.engineCanonicalize(this);
+        Canonicalizer20010315OmitComments c14nizer = new Canonicalizer20010315OmitComments();                  
+        bytes = c14nizer.engineCanonicalize(this);         
         return bytes;
     }
 
     /**
      * Determines if the object has been set up with a Node set
      *
      * @return true if the object has been set up with a Node set
      */
     public boolean isNodeSet() {
-        return (( (this._inputOctetStreamProxy == null)
-              && (this._inputNodeSet != null) ) || isNodeSet);
+        return ((inputOctetStreamProxy == null
+            && inputNodeSet != null) || isNodeSet);
     }
 
     /**
      * Determines if the object has been set up with an Element
      *
-     * @return true if the object has been set up with a Node set
+     * @return true if the object has been set up with an Element
      */
     public boolean isElement() {
-        return ((this._inputOctetStreamProxy==null)&& (this._subNode!=null)
-                && (this._inputNodeSet==null) && !isNodeSet);
+        return (inputOctetStreamProxy == null && subNode != null
+            && inputNodeSet == null && !isNodeSet);
     }
 
     /**
      * Determines if the object has been set up with an octet stream
      *
      * @return true if the object has been set up with an octet stream
      */
     public boolean isOctetStream() {
-        return ( ((this._inputOctetStreamProxy != null) || bytes!=null)
-              && ((this._inputNodeSet == null) && _subNode ==null));
+        return ((inputOctetStreamProxy != null || bytes != null)
+          && (inputNodeSet == null && subNode == null));
     }
 
     /**
      * Determines if {@link #setOutputStream} has been called with a
      * non-null OutputStream.

@@ -355,93 +325,90 @@
      * Determines if the object has been set up with a ByteArray
      *
      * @return true is the object has been set up with an octet stream
      */
     public boolean isByteArray() {
-        return ( (bytes!=null)
-              && ((this._inputNodeSet == null) && _subNode ==null));
+        return (bytes != null && (this.inputNodeSet == null && subNode == null));
     }
 
     /**
      * Is the object correctly set up?
      *
      * @return true if the object has been set up correctly
      */
     public boolean isInitialized() {
-        return (this.isOctetStream() || this.isNodeSet());
+        return isOctetStream() || isNodeSet();
     }
 
     /**
-     * Returns MIMEType
+     * Returns mimeType
      *
-     * @return MIMEType
+     * @return mimeType
      */
     public String getMIMEType() {
-        return this._MIMEType;
+        return mimeType;
     }
 
     /**
-     * Sets MIMEType
+     * Sets mimeType
      *
-     * @param MIMEType
+     * @param mimeType
      */
-    public void setMIMEType(String MIMEType) {
-        this._MIMEType = MIMEType;
+    public void setMIMEType(String mimeType) {
+        this.mimeType = mimeType;
     }
 
     /**
      * Return SourceURI
      *
      * @return SourceURI
      */
     public String getSourceURI() {
-        return this._SourceURI;
+        return sourceURI;
     }
 
     /**
      * Sets SourceURI
      *
-     * @param SourceURI
+     * @param sourceURI
      */
-    public void setSourceURI(String SourceURI) {
-        this._SourceURI = SourceURI;
+    public void setSourceURI(String sourceURI) {
+        this.sourceURI = sourceURI;
     }
 
     /**
      * Method toString
      * @inheritDoc
      */
     public String toString() {
-        if (this.isNodeSet()) {
-            return "XMLSignatureInput/NodeSet/" + this._inputNodeSet.size()
-                   + " nodes/" + this.getSourceURI();
-        }
-        if (this.isElement()) {
-            return "XMLSignatureInput/Element/" + this._subNode
-                + " exclude "+ this.excludeNode + " comments:" +
-                this.excludeComments +"/" + this.getSourceURI();
+        if (isNodeSet()) {
+            return "XMLSignatureInput/NodeSet/" + inputNodeSet.size()
+                   + " nodes/" + getSourceURI();         
+        } 
+        if (isElement()) {
+            return "XMLSignatureInput/Element/" + subNode
+                + " exclude "+ excludeNode + " comments:" 
+                + excludeComments +"/" + getSourceURI();
         }
         try {
-            return "XMLSignatureInput/OctetStream/" + this.getBytes().length
-                   + " octets/" + this.getSourceURI();
+            return "XMLSignatureInput/OctetStream/" + getBytes().length
+                   + " octets/" + getSourceURI();
         } catch (IOException iex) {
-            return "XMLSignatureInput/OctetStream//" + this.getSourceURI();
+            return "XMLSignatureInput/OctetStream//" + getSourceURI();
         } catch (CanonicalizationException cex) {
-            return "XMLSignatureInput/OctetStream//" + this.getSourceURI();
+            return "XMLSignatureInput/OctetStream//" + getSourceURI();
         }
     }
 
     /**
      * Method getHTMLRepresentation
      *
      * @throws XMLSignatureException
      * @return The HTML representation for this XMLSignature
      */
     public String getHTMLRepresentation() throws XMLSignatureException {
-
         XMLSignatureInputDebugger db = new XMLSignatureInputDebugger(this);
-
         return db.getHTMLRepresentation();
     }
 
     /**
      * Method getHTMLRepresentation

@@ -450,14 +417,12 @@
      * @throws XMLSignatureException
      * @return The HTML representation for this XMLSignature
      */
     public String getHTMLRepresentation(Set<String> inclusiveNamespaces)
            throws XMLSignatureException {
-
-        XMLSignatureInputDebugger db = new XMLSignatureInputDebugger( this,
-                                        inclusiveNamespaces);
-
+        XMLSignatureInputDebugger db = 
+            new XMLSignatureInputDebugger(this, inclusiveNamespaces);
         return db.getHTMLRepresentation();
     }
 
     /**
      * Gets the exclude node of this XMLSignatureInput

@@ -478,11 +443,11 @@
     /**
      * Gets the node of this XMLSignatureInput
      * @return The excludeNode set.
      */
     public Node getSubNode() {
-        return _subNode;
+        return subNode;
     }
 
     /**
      * @return Returns the excludeComments.
      */

@@ -507,128 +472,121 @@
         updateOutputStream(diOs, false);
     }
 
     public void updateOutputStream(OutputStream diOs, boolean c14n11)
     throws CanonicalizationException, IOException {
-        if (diOs==outputStream) {
+        if (diOs == outputStream) {
             return;
         }
-        if (bytes!=null) {
+        if (bytes != null) {
             diOs.write(bytes);
-            return;
-        } else if (_inputOctetStreamProxy==null) {
+        } else if (inputOctetStreamProxy == null) {                    
             CanonicalizerBase c14nizer = null;
             if (c14n11) {
                 c14nizer = new Canonicalizer11_OmitComments();
             } else {
                 c14nizer = new Canonicalizer20010315OmitComments();
             }
             c14nizer.setWriter(diOs);
             c14nizer.engineCanonicalize(this);
-            return;
         } else {
-            InputStream is = getResetableInputStream();
-            if (bytes!=null) {
-                //already read write it, can be rea.
-                diOs.write(bytes,0,bytes.length);
-                return;
+            byte[] buffer = new byte[4 * 1024];
+            int bytesread = 0;
+            try {
+                while ((bytesread = inputOctetStreamProxy.read(buffer)) != -1) {
+                    diOs.write(buffer, 0, bytesread);
             }
-            is.reset();
-            int num;
-            byte[] bytesT = new byte[1024];
-            while ((num=is.read(bytesT))>0) {
-                diOs.write(bytesT,0,num);
+            } catch (IOException ex) {
+                inputOctetStreamProxy.close();
+                throw ex;
             }
         }
     }
 
     /**
      * @param os
      */
     public void setOutputStream(OutputStream os) {
-        outputStream=os;
+        outputStream = os;
     }
 
-    protected InputStream getResetableInputStream() throws IOException{
-        if ((_inputOctetStreamProxy instanceof ByteArrayInputStream) ) {
-            if (!_inputOctetStreamProxy.markSupported()) {
-                throw new RuntimeException("Accepted as Markable but not truly been"+_inputOctetStreamProxy);
-            }
-            return _inputOctetStreamProxy;
-        }
-        if (bytes!=null) {
-            _inputOctetStreamProxy=new ByteArrayInputStream(bytes);
-            return _inputOctetStreamProxy;
+    private byte[] getBytesFromInputStream() throws IOException {       
+        if (bytes != null) {
+            return bytes;
         }
-        if (_inputOctetStreamProxy ==null)
+        if (inputOctetStreamProxy == null) {
             return null;
-        if (_inputOctetStreamProxy.markSupported()) {
-            log.log(java.util.logging.Level.INFO, "Mark Suported but not used as reset");
         }
-        bytes=JavaUtils.getBytesFromStream(_inputOctetStreamProxy);
-        _inputOctetStreamProxy.close();
-        _inputOctetStreamProxy=new ByteArrayInputStream(bytes);
-        return _inputOctetStreamProxy;
+        try {
+            bytes = JavaUtils.getBytesFromStream(inputOctetStreamProxy);
+        } finally {
+            inputOctetStreamProxy.close();
+        }
+        return bytes;
     }
 
     /**
      * @param filter
      */
     public void addNodeFilter(NodeFilter filter) {
         if (isOctetStream()) {
             try {
                 convertToNodes();
             } catch (Exception e) {
-                throw new XMLSecurityRuntimeException("signature.XMLSignatureInput.nodesetReference",e);
+                throw new XMLSecurityRuntimeException(
+                    "signature.XMLSignatureInput.nodesetReference", e
+                );
             }
         }
         nodeFilters.add(filter);
     }
 
     /**
      * @return the node filters
      */
     public List<NodeFilter> getNodeFilters() {
-        // TODO Auto-generated method stub
         return nodeFilters;
     }
 
     /**
      * @param b
      */
     public void setNodeSet(boolean b) {
-        isNodeSet=b;
+        isNodeSet = b;
     }
 
     void convertToNodes() throws CanonicalizationException,
         ParserConfigurationException, IOException, SAXException {
-        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        if (dfactory == null) {
+            dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
         dfactory.setValidating(false);
         dfactory.setNamespaceAware(true);
-        dfactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,
-                            Boolean.TRUE);
+        }
         DocumentBuilder db = dfactory.newDocumentBuilder();
         // select all nodes, also the comments.
         try {
-            db.setErrorHandler(new com.sun.org.apache.xml.internal.security.utils
-               .IgnoreAllErrorHandler());
+            db.setErrorHandler(new com.sun.org.apache.xml.internal.security.utils.IgnoreAllErrorHandler());
 
             Document doc = db.parse(this.getOctetStream());
-
-            this._subNode=doc.getDocumentElement();
+            this.subNode = doc;
         } catch (SAXException ex) {
-
             // if a not-wellformed nodeset exists, put a container around it...
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
-            baos.write("<container>".getBytes());
+            baos.write("<container>".getBytes("UTF-8"));
             baos.write(this.getBytes());
-            baos.write("</container>".getBytes());
+            baos.write("</container>".getBytes("UTF-8"));
 
             byte result[] = baos.toByteArray();
             Document document = db.parse(new ByteArrayInputStream(result));
-            this._subNode=document.getDocumentElement().getFirstChild().getFirstChild();
+            this.subNode = document.getDocumentElement().getFirstChild().getFirstChild();                               
+        } finally {
+            if (this.inputOctetStreamProxy != null) {
+                this.inputOctetStreamProxy.close();
         }
-        this._inputOctetStreamProxy=null;
-        this.bytes=null;
+            this.inputOctetStreamProxy = null;
+            this.bytes = null;
     }
+    }
+    
 }