String getCharacterSet() { return HttpUnitUtils.stripQuotes( _characterSet ); }
String getCharacterSet() { return HttpUnitUtils.stripQuotes( _characterSet ); }
String getCharacterSet() { return HttpUnitUtils.stripQuotes( _characterSet ); }
private String getRefreshURL( String text ) { text = text.trim(); if (!text.toUpperCase().startsWith( "URL" )) { return HttpUnitUtils.stripQuotes( text ); } else { int splitIndex = text.indexOf( '=' ); String value = text.substring( splitIndex+1 ).trim(); return HttpUnitUtils.replaceEntities( HttpUnitUtils.stripQuotes( value ) ); } }
private String getRefreshURL( String text ) { text = text.trim(); if (!text.toUpperCase().startsWith( "URL" )) { return HttpUnitUtils.stripQuotes( text ); } else { int splitIndex = text.indexOf( '=' ); String value = text.substring( splitIndex+1 ).trim(); return HttpUnitUtils.replaceEntities( HttpUnitUtils.stripQuotes( value ) ); } }
private String getRefreshURL( String text ) { text = text.trim(); if (!text.toUpperCase().startsWith( "URL" )) { return HttpUnitUtils.stripQuotes( text ); } else { int splitIndex = text.indexOf( '=' ); String value = text.substring( splitIndex+1 ).trim(); return HttpUnitUtils.replaceEntities( HttpUnitUtils.stripQuotes( value ) ); } }
/** * Returns the content type and encoding as a pair of strings. * If no character set is specified, the second entry will be null. * @param header the header to parse * @return a string array with the content type and the content charset **/ public static String[] parseContentTypeHeader( String header ) { String[] result = new String[] { "text/plain", null }; StringTokenizer st = new StringTokenizer( header, ";=" ); result[0] = st.nextToken(); while (st.hasMoreTokens()) { String parameter = st.nextToken(); if (st.hasMoreTokens()) { String value = stripQuotes( st.nextToken() ); if (parameter.trim().equalsIgnoreCase( "charset" )) { result[1] = value; } } } return result; }
/** * Returns the content type and encoding as a pair of strings. * If no character set is specified, the second entry will be null. * @param header the header to parse * @return a string array with the content type and the content charset **/ public static String[] parseContentTypeHeader( String header ) { String[] result = new String[] { "text/plain", null }; StringTokenizer st = new StringTokenizer( header, ";=" ); result[0] = st.nextToken(); while (st.hasMoreTokens()) { String parameter = st.nextToken(); if (st.hasMoreTokens()) { String value = stripQuotes( st.nextToken() ); if (parameter.trim().equalsIgnoreCase( "charset" )) { result[1] = value; } } } return result; }
/** * Returns the content type and encoding as a pair of strings. * If no character set is specified, the second entry will be null. * @param header the header to parse * @return a string array with the content type and the content charset **/ public static String[] parseContentTypeHeader( String header ) { String[] result = new String[] { "text/plain", null }; StringTokenizer st = new StringTokenizer( header, ";=" ); result[0] = st.nextToken(); while (st.hasMoreTokens()) { String parameter = st.nextToken(); if (st.hasMoreTokens()) { String value = stripQuotes( st.nextToken() ); if (parameter.trim().equalsIgnoreCase( "charset" )) { result[1] = value; } } } return result; }