Skip navigation links
oracle.as.scheduler.cp.file
Class InputFile
java.lang.Object
java.io.Reader
java.io.BufferedReader
oracle.as.scheduler.cp.file.InputFile
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Readable
-
public class InputFile
- extends java.io.BufferedReader
This class represents a file provided as input to a request. An instance of this class can be accessed by calling the getInputFile() method with a token (specified by the developer of the program) on the ProcessHelper class.
For text-based files, methods on BufferedReader can be used to read the input. For other files, the getStream() method should be used.
- Version:
- 1.0
- Author:
- Ramkarthik Kalyanasundaram
Fields inherited from class java.io.Reader |
lock |
Constructor Summary |
InputFile(java.lang.String path, java.lang.String fileName)
Create a handle to a file fileName in the directory/path represented by path. |
InputFile(java.lang.String path, java.lang.String fileName, java.lang.String encoding)
Create a handle to a file fileName in the directory/path represented by path. |
Method Summary |
void |
close()
Close this input file. |
java.io.InputStream |
getStream()
Get a handle to the input stream. |
Methods inherited from class java.io.BufferedReader |
mark, markSupported, read, read, readLine, ready, reset, skip |
Methods inherited from class java.io.Reader |
read, read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputFile
public InputFile(java.lang.String path,
java.lang.String fileName)
throws java.io.FileNotFoundException
- Create a handle to a file fileName in the directory/path represented by path.
- Parameters:
path
- directory where this file is located
fileName
- name of the file
- Throws:
java.io.FileNotFoundException
InputFile
public InputFile(java.lang.String path,
java.lang.String fileName,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException
- Create a handle to a file fileName in the directory/path represented by path.
- Parameters:
path
- directory where this file is located
fileName
- name of the file
encoding
- string representing the encoding in which the file should be read
- Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
close
public void close()
throws java.io.IOException
- Close this input file.
-
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.BufferedReader
-
- Throws:
java.io.IOException
- if an error occurs while closing the file
getStream
public java.io.InputStream getStream()
throws java.io.IOException,
java.io.FileNotFoundException
- Get a handle to the input stream. For non-text files, this method should be used to get the input stream.
-
- Returns:
- an
InputStream
value
- Throws:
java.io.IOException
- if an error occurs
java.io.FileNotFoundException
- if an error occurs
Skip navigation links
Copyright © 2008, 2013, Oracle and/or its affiliates. All rights reserved.