Reconstitute the {@code SortedArrayStringMap} instance from a stream (i.e.,
deserialize it).
174857
private void readObject(final java.io.ObjectInputStream s)  throws IOException, ClassNotFoundException {
        // Read in the threshold (ignored), and any hidden stuff
        s.defaultReadObject();

        // set other fields that need values
        keys = EMPTY;
        values = EMPTY;

        // Read in number of buckets
        final int capacity = s.readInt();
        if (capacity < 0) {
            throw new InvalidObjectException("Illegal capacity: " + capacity);
        }

        // Read number of mappings
        final int mappings = s.readInt();
        if (mappings < 0) {
            throw new InvalidObjectException("Illegal mappings count: " + mappings);
        }

        // allocate the bucket array;
        if (mappings > 0) {
            inflateTable(capacity);
        } else {
            threshold = capacity;
        }

        // Read the keys and values, and put the mappings in the arrays
        for (int i = 0; i < mappings; i++) {
            keys[i] = (String) s.readObject();
            try {
                final byte[] marshalledObject = (byte[]) s.readObject();
                values[i] = marshalledObject == null ? null : unmarshall(marshalledObject);
            } catch (final Exception | LinkageError error) {
                handleSerializationException(error, i, keys[i]);
                values[i] = null;
            }
        }
        size = mappings;
    }
582335
private static Map<String, Object> readMap(StreamingInput input)
		throws IOException
	{
		boolean readEnd = false;
		if(input.peek() == Token.OBJECT_START)
		{
			// Check if the object is wrapped
			readEnd = true;
			input.next();
		}

		Token t;
		Map<String, Object> result = new HashMap<String, Object>();
		while((t = input.peek()) != Token.OBJECT_END && t != null)
		{
			// Read the key
			input.next(Token.KEY);
			String key = input.getString();

			// Read the value
			Object value = readDynamic(input);

			result.put(key, value);
		}

		if(readEnd)
		{
			input.next(Token.OBJECT_END);
		}

		return result;
	}
216021
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
	{
		// this should set servlet...
		in.defaultReadObject();
		try
		{
			init();
		}
		catch(ServletException e)
		{	// This could happen if it is deserialized in
			// a container where the name or path does not
			// exist. I can't see this happening unless the
			// container itself is screwed up though.
			throw new IllegalStateException("Unable to reinitialize dispatcher after deserialization.", e);
		}
	}
1114919
private void readObject(ObjectInputStream stream)
        throws IOException, ClassNotFoundException
    {
        stream.defaultReadObject();

        // set transient fields
        setOut( System.out );
        setErr( System.err );
    }
637315
public void reconstitute(BaseDestinationHandler destinationHandler, 
                           SIMPTransactionManager txManager, 
                           ProducerInputHandler inputHandler)
    throws MessageStoreException, SIException
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "reconstitute", new Object[] {destinationHandler, txManager, inputHandler}); 

    super.reconstitute(destinationHandler, txManager);
    
    reconstituteTargetStreams(inputHandler);
          
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "reconstitute");           
  }
1084608
private void reconstituteTargetStreams(ProducerInputHandler inputHandler)
    throws MessageStoreException,
    SIException,
    SIResourceException   
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "reconstituteTargetStreams");

    /*
     * Iterate through all contained Protocol Items, rebuilding
     * associated target streams for each.
     */ 
    NonLockingCursor cursor = null;
    
    try
    {
      cursor = newNonLockingItemCursor(new ClassEqualsFilter(StreamSet.class));
           
	    AbstractItem item = null;
	    while (null != (item = cursor.next()))
	    {
	      StreamSet streamSet = (StreamSet)item;
	      inputHandler.reconstituteTargetStreams(streamSet);
	    }
    }
    finally
    {
      if (cursor != null)
        cursor.finished();
    }

    if (tc.isEntryEnabled())  
      SibTr.exit(tc, "reconstituteTargetStreams");      
  }
1024699
@Override
    public T fromStream(final InputStream in) throws IllegalArgumentException, DescriptorImportException {
        return fromStream(in, true);
    }
134415
public static <K,V> SortedMap<K,V> asSynchronized(SortedMap<K,V> self) {
        return Collections.synchronizedSortedMap(self);
    }
272593
private void readObject(ObjectInputStream stream) throws IOException {
        try {
            decode(stream);
        } catch (InvalidKeyException e) {
            e.printStackTrace();
            throw new IOException("deserialized key is invalid: " +
                                  e.getMessage());
        }
    }
1215998
@SuppressWarnings("unchecked")
    public static Map<String, String> deserializeMap(String map) {
        if (map == null || map.equals("")) {
            return new HashMap<String, String>();
        } else {
            XStream xstream = new XStream(new DomDriver());
            return (Map<String, String>) xstream.fromXML(map);
        }
    }
404053
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        this.runtimeMetaData = new HashMap<String, Object>();
    }
1193345
private void readObject(java.io.ObjectInputStream s)
        throws IOException, ClassNotFoundException
    {
        // Read in the threshold, loadfactor, and any hidden stuff
        s.defaultReadObject();
        
        // Read in number of buckets and allocate the bucket array;
        int numBuckets = s.readInt();
        table = new Entry[numBuckets];
        
        // Read in size (number of Mappings)
        int size = s.readInt();
        
        // Read the keys and values, and put the mappings in the IntHashMap
        for (int i=0; i<size; i++) {
            int key = s.readInt();
            V value = (V) s.readObject();
            put(key, value);
        }
    }
97259
private synchronized void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();

        // the transient _nameMap is null after an instance of
        // NameService has been serialized.
        if (_nameMap == null) {
            _nameMap = new HashMap();
        }
    }
534621
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
		// Read in size, and any hidden stuff
		s.defaultReadObject();
		
		this.stringDecoder = new Utf8();
		this.in = null;
	}
1277469
private void readObject(ObjectInputStream in)
      throws IOException, ClassNotFoundException {
    // Init
    COUNTER = new AtomicInteger();
    serializers = new HashMap<Class, SerializerWrapper>();
    serializersArray = new Serializer[0];

    deserialize(in, this);
  }
45274
private static final Serializable deserialize(byte[] array, int offset, int length) throws IOException, ClassNotFoundException {  

	   ByteArrayInputStream byteArrayInputStream = null;
	  ObjectInputStream objectInputStream = null;
	  try {
          byteArrayInputStream = new ByteArrayInputStream(array, offset, length);
		  byteArrayInputStream.mark(array.length);
      	  objectInputStream = new ObjectInputStream(byteArrayInputStream);

		  return (Serializable) objectInputStream.readObject();
	  } catch (ClassNotFoundException cnfe) {
		  ClassLoader cl = getClassLoader();
		  if (cl != null) {
			  byteArrayInputStream.reset();
          	  objectInputStream = new WsObjectInputStream(byteArrayInputStream, cl);
			  return (Serializable) objectInputStream.readObject();
		  } else {
			  throw cnfe;
		  }
	  } catch (NoClassDefFoundError cnfe) {
		  ClassLoader cl = getClassLoader();
		  if (cl != null) {
			  byteArrayInputStream.reset();
          	  objectInputStream = new WsObjectInputStream(byteArrayInputStream, cl);
			  return (Serializable) objectInputStream.readObject();
		  } else {
			  throw cnfe;
		  }	    
	  } catch (StreamCorruptedException cnfe) {
		  ClassLoader cl = getClassLoader();
		  if (cl != null) {
			  byteArrayInputStream.reset();
          	  objectInputStream = new WsObjectInputStream(byteArrayInputStream, cl);
			  return (Serializable) objectInputStream.readObject();
		  } else {
			  throw cnfe;
		  }
	  } finally { 
          if (byteArrayInputStream != null) {
              byteArrayInputStream.close();
          }
          if (objectInputStream != null) {
              objectInputStream.close();
          }
      }
   }
1187588
public static INDArray deserializeRawJson(String serializedRawArray) {

        //String cleanedRawArray = serializedRawArray.replaceAll("(?<=[\\d])(,)(?=[\\d])", "");
        String cleanedRawArray = serializedRawArray;
        JsonArray jsonArray = JSON_PARSER.parse(cleanedRawArray).getAsJsonArray();

        List<Integer> dimensions = new ArrayList<>();
        dimensions.add(jsonArray.size());
        getSizeMultiDimensionalArray(jsonArray, dimensions);

        return buildArray(dimensions, cleanedRawArray);
    }