org.apache.wicket.resource
Class ResourceUtil

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

public class ResourceUtil
extends Object

Utilities for resources.

Author:
Jeremy Thomerson

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

Method Detail

renderTo

@Deprecated
public static void renderTo(IHeaderResponse resp,
                                       ResourceReference ref,
                                       boolean css,
                                       String string)
Deprecated. Will be removed in the next major release

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)

renderTo

public static void renderTo(IHeaderResponse resp,
                            ResourceReferenceAndStringData data)
Helper that calls the proper IHeaderResponse.render*Reference method based on the input.

Parameters:
resp - the response to call render*Reference methods on
data -

readString

public static 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 String readString(IResourceStream resourceStream,
                                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-2012 Apache Software Foundation. All Rights Reserved.