docs: public void readExternal( ObjectInput stream ) throws IOException,
              ClassNotFoundException {
          KeyStoreHelper helper = new KeyStoreHelper();
          boolean signed = stream.readBoolean();
          if (helper.isSigned() != signed) {
              throw new RuntimeException( "This environment is configured to work with " +
                                          ( helper.isSigned() ? "signed" : "unsigned" ) +
                                          " serialized objects, but the given object is " +
                                          ( signed ? "signed" : "unsigned" ) + ". Deserialization aborted." );
          }
          String pubKeyAlias = null;
          if (signed) {
              pubKeyAlias = (String) stream.readObject();
              if (helper.getPubKeyStore() == null) {
                  throw new RuntimeException( "The package was serialized with a signature. Please configure a public keystore with the public key to check the signature. Deserialization aborted." );
              }
          }
  
          // Return the object stored as a byte[]
          byte[] bytes = (byte[]) stream.readObject();
          if (signed) {
              checkSignature( stream,
                              helper,
                              bytes,
                              pubKeyAlias );
          }
  
          ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( bytes ) );
          for (int i = 0, length = in.readInt(); i < length; i++) {
              this.store.put( (String) in.readObject(),
                              (byte[]) in.readObject() );
          }
          in.close();
  
          for (int i = 0, length = stream.readInt(); i < length; i++) {
              this.invokerLookups.put( (String) stream.readObject(),
                                       (Wireable) stream.readObject() );
          }
  
          for (int i = 0, length = stream.readInt(); i < length; i++) {
              this.classLookups.put( (String) stream.readObject(),
                                     (byte[]) stream.readObject() );
          }
  
          // mark it as dirty, so that it reloads everything.
          this.dirty = true;
      }