< prev index next >

## src/java.smartcardio/share/classes/javax/smartcardio/CommandAPDU.java

Print this page

    @@ -1,7 +1,7 @@
      /*
    -  * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
    +  * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
       * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       *
       * This code is free software; you can redistribute it and/or modify it
       * under the terms of the GNU General Public License version 2 only, as
       * published by the Free Software Foundation.  Oracle designates this

    @@ -26,10 +26,11 @@
      package javax.smartcardio;

      import java.util.Arrays;

      import java.nio.ByteBuffer;
    + import java.io.IOException;

      /**
       * A command APDU following the structure defined in ISO/IEC 7816-4.
       * It consists of a four byte header and a conditional body of variable length.
       * This class does not attempt to verify that the APDU encodes a semantically

    @@ -594,12 +595,20 @@
           */
          public int hashCode() {
              return Arrays.hashCode(apdu);
          }

    +
    +     /**
    +      * Restores the state of this object from the stream.
    +      *
    +      * @param  in the {@code ObjectInputStream} from which data is read
    +      * @throws IOException if an I/O error occurs
    +      * @throws ClassNotFoundException if a serialized class cannot be loaded
    +      */
          private void readObject(java.io.ObjectInputStream in)
    -             throws java.io.IOException, ClassNotFoundException {
    +             throws IOException, ClassNotFoundException {
              apdu = (byte[])in.readUnshared();
              // initialize transient fields
              parse();
          }

< prev index next >