getTransferFormatFromString function

TransferFormat getTransferFormatFromString (String value)

Implementation

TransferFormat getTransferFormatFromString(String value) {
  if (value == null) {
    return null;
  }

  value = value.toUpperCase();
  switch (value) {
    case "TEXT":
      return TransferFormat.Text;
      break;
    case "BINARY":
      return TransferFormat.Binary;
      break;
    default:
      throw new GeneralError("$value is not a supported HttpTransportType");
  }
}