com.asual.lesscss.loader
Class UnixNewlinesResourceLoader
java.lang.Object
com.asual.lesscss.loader.UnixNewlinesResourceLoader
- All Implemented Interfaces:
- ResourceLoader
public class UnixNewlinesResourceLoader
- extends Object
- implements ResourceLoader
A delegating that removes \r characters
from resource content, thus converting Windows newlines to Unix ones.
- Author:
- RafaĆ Krzewski
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnixNewlinesResourceLoader
public UnixNewlinesResourceLoader(ResourceLoader delegate)
exists
public boolean exists(String path)
throws IOException
- Description copied from interface:
ResourceLoader
- Checks if the given resource exists.
- Specified by:
exists in interface ResourceLoader
- Parameters:
path - resource path.
- Returns:
true if the resource exists.
- Throws:
IOException - when i/o error occurs while checking for resource existence.
load
public String load(String path,
String charset)
throws IOException
- Description copied from interface:
ResourceLoader
- Loads the given resource's contents.
- Specified by:
load in interface ResourceLoader
- Parameters:
path - resource path.charset - character set name, valid with respect to
Charset.
- Returns:
- resource contents as a string.
- Throws:
IOException - when i/o error occurs while loading the resource, or charset
is invalid.
Copyright © 2013 Asual DZZD. All Rights Reserved.