code: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
          // read values
          in.defaultReadObject();
  
          OutputStream output = getOutputStream();
          if (cachedContent != null) {
              output.write(cachedContent);
          }
          output.close();
  
          cachedContent = null;
      }
docs: Reads the state of this object during deserialization.
  
  @param in the stream from which the state should be read
  @throws IOException if an error occurs
  @throws ClassNotFoundException if class cannot be found