com.softicar.platform.common.io.classpath.file.IClasspathFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.io.classpath.file;
import java.io.InputStream;
/**
* A proxy to the contents of a file on the class path.
*
* @author Alexander Schmidt
* @author Oliver Richers
*/
public interface IClasspathFile {
/**
* Opens the file content as an {@link InputStream}.
*
* The returned stream must be closed by the caller side.
*
* @return the content of the file as an {@link InputStream}
*/
InputStream getInputStream();
/**
* Returns the file name without path.
*
* @return the name of the file (never null)
*/
String getName();
/**
* Returns the file path relative to the class path root.
*
* @return the file path (never null)
*/
String getRelativePath();
/**
* Returns whether this is a directory or not.
*
* @return true if this is a directory; false otherwise
*/
boolean isDirectory();
}