@ThreadSafe public class ClassPathResource extends ResourceSupport implements NameEnabledResource, UriEnabledResource, PrivateUrlEnabledResource
| Modifier | Constructor and Description |
|---|---|
protected |
ClassPathResource(java.lang.String path,
ResourceType type,
java.lang.ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.ClassLoader |
getClassLoader() |
java.util.Date |
getLastModified() |
byte[] |
getMd5() |
java.lang.String |
getName() |
java.net.URL |
getPrivateUrl() |
long |
getSize() |
ResourceType |
getType() |
java.lang.String |
getUri() |
protected void |
initMd5AndSize() |
boolean |
isExisting() |
boolean |
isGenerated() |
java.io.InputStream |
openInputStream() |
equals, hashCode, release, toString, touchprotected ClassPathResource(@Nonnull
java.lang.String path,
@Nonnull
ResourceType type,
@Nonnull
java.lang.ClassLoader classLoader)
@Nonnull
public java.io.InputStream openInputStream()
throws java.io.IOException
openInputStream in interface Resourcejava.io.IOException@Nonnull public ResourceType getType()
@Nonnull
public byte[] getMd5()
throws java.io.IOException
getMd5 in interface ResourcegetMd5 in class ResourceSupportjava.io.IOExceptionpublic long getSize()
throws java.io.IOException
getSize in interface ResourcegetSize in class ResourceSupportjava.io.IOExceptionpublic java.util.Date getLastModified()
throws java.io.IOException
getLastModified in interface Resourcejava.io.IOExceptionpublic boolean isExisting()
throws java.io.IOException
isExisting in interface Resourcejava.io.IOExceptionprotected void initMd5AndSize()
throws java.io.IOException
java.io.IOException@Nonnull public java.lang.String getName()
getName in interface NameEnabledResource@Nonnull public java.lang.String getUri()
getUri in interface UriEnabledResourcepublic boolean isGenerated()
throws java.io.IOException
isGenerated in interface Resourcejava.io.IOException@Nonnull
public java.net.URL getPrivateUrl()
throws java.io.IOException
getPrivateUrl in interface PrivateUrlEnabledResourcejava.io.IOException@Nonnull public java.lang.ClassLoader getClassLoader()
Copyright © 2015 echocat. All Rights Reserved.