code: protected void readStreamHeader() throws IOException,
              StreamCorruptedException {
          if (input.readShort() == STREAM_MAGIC
                  && input.readShort() == STREAM_VERSION) {
              return;
          }
          throw new StreamCorruptedException();
      }
docs: Reads and validates the ObjectInputStream header from the source stream.
  
  @throws IOException
  if an error occurs while reading from the source stream.
  @throws StreamCorruptedException
  if the source stream does not contain readable serialized
  objects.