String dateString;
if ( next == '"' ) {
dateString = consumeQuoted( request );
}
else {
throw new ProtocolException( "DateTime values must be quoted." );
}
DateFormat dateFormat = new SimpleDateFormat( "dd-MMM-yyyy hh:mm:ss zzzz" );
try {
return dateFormat.parse( dateString );
}
catch ( ParseException e ) {
throw new ProtocolException( "Invalid date format." );
}
}