code: public static String readString(final ObjectInput in) throws IOException,
              ClassNotFoundException {
          try {
              Object o = in.readObject();
              return (String) o;
          } catch (OptionalDataException e) {
              StringBuilder bldr = new StringBuilder();
              if (e.length == 0) {
                  bldr.append("(attempted to read past end of object data)");
              } else {
                  bldr.append("(attempted to read object data when ");
                  bldr.append(e.length);
                  bldr.append(" byte(s) of primitive data is present)");
              }
              err.println(bldr);
              e.printStackTrace();
              throw e;
          }
      }
docs: Reads a {@link String} from the input.
  
  @param in Non-null {@link ObjectInput}
  @return {@link String}
  @throws IOException Thrown if an I/O error occurred
  @throws ClassNotFoundException Thrown if the class of the object being
  read cannot be found