private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
  s.defaultReadObject();
  String csName=(String)s.readObject();
  byte[] data=(byte[])s.readObject();
  int cspace=0;
  boolean isKnownPredefinedCS=false;
  if (csName != null) {
    isKnownPredefinedCS=true;
    if (csName.equals("CS_sRGB")) {
      cspace=ColorSpace.CS_sRGB;
    }
 else     if (csName.equals("CS_CIEXYZ")) {
      cspace=ColorSpace.CS_CIEXYZ;
    }
 else     if (csName.equals("CS_PYCC")) {
      cspace=ColorSpace.CS_PYCC;
    }
 else     if (csName.equals("CS_GRAY")) {
      cspace=ColorSpace.CS_GRAY;
    }
 else     if (csName.equals("CS_LINEAR_RGB")) {
      cspace=ColorSpace.CS_LINEAR_RGB;
    }
 else {
      isKnownPredefinedCS=false;
    }
  }
  if (isKnownPredefinedCS) {
    resolvedDeserializedProfile=getInstance(cspace);
  }
 else {
    resolvedDeserializedProfile=getInstance(data);
  }
}

private void readObject ( ObjectInputStream s ) throws IOException , ClassNotFoundException { s . defaultReadObject ( ) ; String csName = ( String ) s . readObject ( ) ; byte [ ] data = ( byte [ ] ) s . readObject ( ) ; int cspace = 0 ; boolean isKnownPredefinedCS = false ; if ( csName != null ) { isKnownPredefinedCS = true ; if ( csName . equals ( "CS_sRGB" ) ) { cspace = ColorSpace . CS_sRGB ; } else if ( csName . equals ( "CS_CIEXYZ" ) ) { cspace = ColorSpace . CS_CIEXYZ ; } else if ( csName . equals ( "CS_PYCC" ) ) { cspace = ColorSpace . CS_PYCC ; } else if ( csName . equals ( "CS_GRAY" ) ) { cspace = ColorSpace . CS_GRAY ; } else if ( csName . equals ( "CS_LINEAR_RGB" ) ) { cspace = ColorSpace . CS_LINEAR_RGB ; } else { isKnownPredefinedCS = false ; } } if ( isKnownPredefinedCS ) { resolvedDeserializedProfile = getInstance ( cspace ) ; } else { resolvedDeserializedProfile = getInstance ( data ) ; } }
reads default serializable fields from the stream . reads from the stream a string and an array of bytes as additional data .
