public static String apiMimeTypeToNetworkMimeType(String apiMimeType){
  if (apiMimeType.startsWith(MimeType.GEOLOC_MESSAGE)) {
    return GeolocInfoDocument.MIME_TYPE;
  }
 else   if (isTextPlainType(apiMimeType)) {
    return MimeType.TEXT_MESSAGE;
  }
 else   if (apiMimeType.startsWith(FileTransferHttpInfoDocument.MIME_TYPE)) {
    return FileTransferHttpInfoDocument.MIME_TYPE;
  }
  throw new IllegalArgumentException("Unsupported input mimetype detected : " + apiMimeType);
}

public static String apiMimeTypeToNetworkMimeType ( String apiMimeType ) { if ( apiMimeType . startsWith ( MimeType . GEOLOC_MESSAGE ) ) { return GeolocInfoDocument . MIME_TYPE ; } else if ( isTextPlainType ( apiMimeType ) ) { return MimeType . TEXT_MESSAGE ; } else if ( apiMimeType . startsWith ( FileTransferHttpInfoDocument . MIME_TYPE ) ) { return FileTransferHttpInfoDocument . MIME_TYPE ; } throw new IllegalArgumentException ( "Unsupported input mimetype detected : " + apiMimeType ) ; }
generate persisted mime - type from network pay - load
