cn.dreampie.resource
接口 Resource

所有已知实现类:
FileResource, HttpResource

public interface Resource

LESS resource interface.

Abstracts LessSource from resource access technology. Makes it possible to load LESS resources from files, classpath resource, URL, etc.

作者:
Anton Pechinsky

方法摘要
 Resource createRelative(String relativeResourcePath)
          Creates relative resource for current resource.
 boolean exists()
          Tests if resource exists.
 InputStream getInputStream()
          Returns resource input stream.
 String getName()
          Returns a unique name for this resource.
 long lastModified()
          Returns the time that the LESS source was last modified.
 

方法详细信息

exists

boolean exists()
Tests if resource exists.

返回:
true if resource exists.

lastModified

long lastModified()
Returns the time that the LESS source was last modified.

返回:
A long value representing the time the resource was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).

getInputStream

InputStream getInputStream()
                           throws IOException
Returns resource input stream.

抛出:
IOException

createRelative

Resource createRelative(String relativeResourcePath)
                        throws IOException
Creates relative resource for current resource.

参数:
relativeResourcePath - String relative resource path
返回:
Resource relative resource
抛出:
IOException

getName

String getName()
Returns a unique name for this resource. (ie file name for files)

返回:
the name of the resource


Copyright © 2014. All rights reserved.