code: public void readObject(@NonNull ObjectInputStream stream) throws IOException, ClassNotFoundException {
          id = (String)stream.readObject();
          createdTime = stream.readLong();
          lastAccessedTime = stream.readLong();
          maxInactiveInterval = stream.readInt();
          isNew = stream.readBoolean();
          isValid = stream.readBoolean();
  
          // Deserialize the attribute count and attribute values
          int size = stream.readInt();
          for (int i = 0; i < size; i++) {
              String name = (String)stream.readObject();
              Object value = stream.readObject();
              mAttributes.put(name, value);
          }
      }
docs: Read attribute values from the stream.
  
  @param stream stream.
  
  @throws IllegalStateException if a new session cannot be instantiated for any reason.
  @throws IOException if the input error occurs while processing this request.