polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* VFS based {@link Resource} implementation.
|
||||
* Supports the corresponding VFS API versions on JBoss AS 5.x as well as 6.x.
|
||||
* Supports the corresponding VFS API versions on JBoss AS 5.x as well as 6.x and 7.x.
|
||||
*
|
||||
* @author Ales Justin
|
||||
* @author Juergen Hoeller
|
||||
@@ -47,22 +47,21 @@ public class VfsResource extends AbstractResource {
|
||||
}
|
||||
|
||||
|
||||
public boolean exists() {
|
||||
return VfsUtils.exists(this.resource);
|
||||
}
|
||||
|
||||
public boolean isReadable() {
|
||||
return VfsUtils.isReadable(this.resource);
|
||||
}
|
||||
|
||||
public long lastModified() throws IOException {
|
||||
return VfsUtils.getLastModified(this.resource);
|
||||
}
|
||||
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return VfsUtils.getInputStream(this.resource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean exists() {
|
||||
return VfsUtils.exists(this.resource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadable() {
|
||||
return VfsUtils.isReadable(this.resource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public URL getURL() throws IOException {
|
||||
try {
|
||||
return VfsUtils.getURL(this.resource);
|
||||
@@ -72,6 +71,7 @@ public class VfsResource extends AbstractResource {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public URI getURI() throws IOException {
|
||||
try {
|
||||
return VfsUtils.getURI(this.resource);
|
||||
@@ -81,10 +81,17 @@ public class VfsResource extends AbstractResource {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getFile() throws IOException {
|
||||
return VfsUtils.getFile(this.resource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long lastModified() throws IOException {
|
||||
return VfsUtils.getLastModified(this.resource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resource createRelative(String relativePath) throws IOException {
|
||||
if (!relativePath.startsWith(".") && relativePath.contains("/")) {
|
||||
try {
|
||||
@@ -98,6 +105,7 @@ public class VfsResource extends AbstractResource {
|
||||
return new VfsResource(VfsUtils.getRelative(new URL(getURL(), relativePath)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFilename() {
|
||||
return VfsUtils.getName(this.resource);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user