org.glassfish.grizzly.http.util
Class Utils

java.lang.Object
  extended by org.glassfish.grizzly.http.util.Utils

public class Utils
extends Object

Utility class.

Author:
Alexey Stashok

Constructor Summary
Utils()
           
 
Method Summary
static BufferChunk getHttpStatusMessage(int httpStatus)
           
static Charset lookupCharset(String charsetName)
          Lookup a Charset by name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

lookupCharset

public static Charset lookupCharset(String charsetName)
Lookup a Charset by name. Fixes Charset concurrency issue (http://paul.vox.com/library/post/the-mysteries-of-java-character-set-performance.html)

Parameters:
charsetName -
Returns:
Charset

getHttpStatusMessage

public static BufferChunk getHttpStatusMessage(int httpStatus)
Parameters:
httpStatus - HTTP status code
Returns:
the standard HTTP message associated with the specified status code. If there is no message for the specified httpStatus, null shall be returned.


Copyright © 2010 Oracle Corpration. All Rights Reserved.