org.apache.wicket.resource
Class ResourceUtil

java.lang.Object
  extended by org.apache.wicket.resource.ResourceUtil

public class ResourceUtil
extends java.lang.Object

Utilities for resources.

Author:
Jeremy Thomerson

Method Summary
static java.lang.String readString(IResourceStream resourceStream)
          read string with platform default encoding from resource stream
static java.lang.String readString(IResourceStream resourceStream, java.nio.charset.Charset charset)
          read string with specified encoding from resource stream
static void renderTo(IHeaderResponse resp, ResourceReference ref, boolean css, java.lang.String string)
          Helper that calls the proper IHeaderResponse.render*Reference method based on the input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

renderTo

public static void renderTo(IHeaderResponse resp,
                            ResourceReference ref,
                            boolean css,
                            java.lang.String string)
Helper that calls the proper IHeaderResponse.render*Reference method based on the input.

Parameters:
resp - the response to call render*Reference methods on
ref - the reference to render
css - true if this is a css reference
string - the string argument to pass to those methods that accept it (js = id / css = media)

readString

public static java.lang.String readString(IResourceStream resourceStream)
read string with platform default encoding from resource stream

Parameters:
resourceStream -
Returns:
string read from resource stream
See Also:
readString(org.apache.wicket.util.resource.IResourceStream, java.nio.charset.Charset)

readString

public static java.lang.String readString(IResourceStream resourceStream,
                                          java.nio.charset.Charset charset)
read string with specified encoding from resource stream

Parameters:
resourceStream - string source
charset - charset for the string encoding (use null for platform default)
Returns:
string read from resource stream


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.