All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rrsunhome.excelsql.io.Resource Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
package com.github.rrsunhome.excelsql.io;

import java.io.IOException;
import java.io.InputStream;

/**
 * The interface represent a resource.
 */
public interface Resource {

  /**
   * Get the resource absolute path.
   * 
   * @return the resource absolute path.
   */
  String getPath();

  /**
   * Get the resource extension.
   * 
   * @return the resource extension.
   */
  String getExtension();

  /**
   * Get a description for this resource, to be used for error output when working with the
   * resource.
   * 
   * @return the description.
   */
  String getDescription();

  /**
   * Check if the resource exists or not.
   * 
   * @return true if exists.
   */
  boolean exists();

  /**
   * Open an {@link InputStream} for the resource.
   * 
   * @return the input stream of the resource.
   * @throws IOException if occurs error when opens the input stream for the resource.
   */
  InputStream getInputStream() throws IOException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy