ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/ifsfilereaderjavadoc.htm

739 lines
35 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4.0//EN">
<HTML>
<HEAD>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2002, 2004 by IBM Corporation">
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<meta name="Owner" content="rchinfoc@us.ibm.com">
<meta scheme="rfc1766" name="DC.Language" content="en-us">
<meta scheme="iso8601" name="DC.Date" content="2004-04-01">
<meta name="Security" content="public">
<meta name="Source" content="">
<meta name="Robots" content="index,follow">
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))'>
<meta name="keywords" content="com.ibm.as400.access.IFSFileReader,IFSFileReader class">
<link rel="stylesheet" type="text/css" href="javadoc/stylesheet.css" title="Style">
<TITLE>IFSFileReader</TITLE></head>
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="javadoc/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="javadoc/com/ibm/as400/access/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="javadoc/com/ibm/as400/access/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="javadoc/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="javadoc/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="javadoc/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</td>
<td rowspan="3" align="right" valign="top"><em>
</em>
</td>
</tr>
<tr>
<td class="NavBarCell2" bgcolor="white"><font size="-2">
&nbsp;<a href="javadoc/com/ibm/as400/access/IFSFileOutputStream.html"><b>PREV CLASS</b></a>&nbsp;
&nbsp;<a href="ifsfilereaderjavadoc.htm"><b>NEXT CLASS</b></a></font></td>
<td class="NavBarCell2" bgcolor="white"><font size="-2">
<a href="javadoc/index.html" target="_top"><b>FRAMES</b></a> &nbsp;
&nbsp;<a href="ifsfilewriterjavadoc.htm" target="_top"><b>NO FRAMES</b></a> &nbsp;
&nbsp;
<noscript>
<A HREF="javadoc/allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</noscript>
</font></td>
</tr>
<tr>
<td class="NavBarCell3" valign="top"><font size="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<a href="#field_summary">FIELD</a>&nbsp;|&nbsp;<a href="#constructor_summary">CONSTR</a>&nbsp;|&nbsp;<a href="#method_summary">METHOD</a></font></td>
<td class="NavBarCell3" valign="top"><font size="-2">
DETAIL:&nbsp;<a href="#field_detail">FIELD</a>&nbsp;|&nbsp;<a href="#constructor_detail">CONSTR</a>&nbsp;|&nbsp;<a href="#method_detail">METHOD</a></font></td>
</tr>
</tbody></table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<!-- ======== START OF CLASS DATA ======== -->
<h2>
<font size="-1">
com.ibm.as400.access</font>
<br>
Class IFSFileReader</h2>
<pre><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">java.lang.Object</a>
|
+--<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">java.io.Reader</a>
|
+--<b>com.ibm.as400.access.IFSFileReader</b>
</pre>
<hr>
<dl>
<dt>public class <b>IFSFileReader</b></dt><dt>extends <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></dt></dl>
<p>
Convenience class for reading character files in the integrated file system.
The behavior of this class is comparable to <tt>java.io.FileReader</tt>.
IFSFileReader is meant for reading streams of characters.
For reading streams of raw bytes, consider using a <a href="javadoc/com/ibm/as400/access/IFSFileInputStream.html"><code>IFSFileInputStream</code></a>.
<br>
The following example illustrates the use of IFSFileReader:
</p><pre>import java.io.BufferedReader;
// Work with /File1 on the system eniac.
AS400 system = new AS400("eniac");
IFSFile file = new IFSFile(system, "/File1");
BufferedReader reader = new BufferedReader(new IFSFileReader(file));
// Read the first line of the file, converting characters.
String line1 = reader.readLine();
// Display the String that was read.
System.out.println(line1);
// Close the reader.
reader.close();
</pre>
<p>
</p><p>
</p><hr>
<p>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<a name="field_summary"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableHeadingColor" bgcolor="#ccccff">
<td colspan="2"><font size="+2">
<b>Field Summary</b></font></td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>static&nbsp;int</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#SHARE_ALL">SHARE_ALL</a></b></code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Share option that allows read and write access by other users.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>static&nbsp;int</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#SHARE_NONE">SHARE_NONE</a></b></code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Share
option that does not allow read or write access by other users.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>static&nbsp;int</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#SHARE_READERS">SHARE_READERS</a></b></code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Share option that allows only read access by other users.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>static&nbsp;int</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#SHARE_WRITERS">SHARE_WRITERS</a></b></code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Share option that allows only write access by other users.</td>
</tr>
</tbody></table>
&nbsp;<a name="fields_inherited_from_class_java.io.Reader"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableSubHeadingColor" bgcolor="#eeeeff">
<td><b>Fields inherited from class java.io.<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></b></td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#lock">lock</a></code></td>
</tr>
</tbody></table>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<a name="constructor_summary"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableHeadingColor" bgcolor="#ccccff">
<td colspan="2"><font size="+2">
<b>Constructor Summary</b></font></td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td><code><b><a href="ifsfilereaderjavadoc.htm#IFSFileReader(com.ibm.as400.access.IFSFile)">IFSFileReader</a></b>(<a href="javadoc/com/ibm/as400/access/IFSFile.html">IFSFile</a>&nbsp;file)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an IFSFileReader object.
</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td><code><b><a href="ifsfilereaderjavadoc.htm#IFSFileReader(com.ibm.as400.access.IFSFileDescriptor)">IFSFileReader</a></b>(<a href="javadoc/com/ibm/as400/access/IFSFileDescriptor.html">IFSFileDescriptor</a>&nbsp;fd)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an IFSFileReader object.
</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td><code><b><a href="ifsfilereaderjavadoc.htm#IFSFileReader(com.ibm.as400.access.IFSFile, int)">IFSFileReader</a></b>(<a href="javadoc/com/ibm/as400/access/IFSFile.html">IFSFile</a>&nbsp;file,
int&nbsp;ccsid)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an IFSFileReader object.
</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td><code><b><a href="ifsfilereaderjavadoc.htm#IFSFileReader(com.ibm.as400.access.IFSFile,int,int)">IFSFileReader</a></b>(<a href="javadoc/com/ibm/as400/access/IFSFile.html">IFSFile</a>&nbsp;file,
int&nbsp;ccsid,
int&nbsp;shareOption)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an IFSFileReader object.
</td>
</tr>
</tbody></table>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<a name="method_summary"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableHeadingColor" bgcolor="#ccccff">
<td colspan="2"><font size="+2">
<b>Method Summary</b></font></td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;void</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#close()">close</a></b>()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the stream. </td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;int</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#getCCSID()">getCCSID</a></b>()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the CCSID used by this IFSFileReader.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</a></code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#getEncoding()">getEncoding</a></b>()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the encoding used by this IFSFileReader.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;<a href="javadoc/com/ibm/as400/access/IFSKey.html">IFSKey</a></code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#lockBytes(int)">lockBytes</a></b>(int&nbsp;length)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Places a lock on the file at the current position for the specified
number of bytes.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;boolean</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#markSupported()">markSupported</a></b>()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IFSFileReader does not support the mark() operation.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;int</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#read()">read</a></b>()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a single character.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;int</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#read(char)">read</a></b>(char[]&nbsp;cbuf)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads characters into an array. </td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;int</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#read(char,int,int)">read</a></b>(char[]&nbsp;cbuf,
int&nbsp;off,
int&nbsp;len)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads characters into a portion of an array. </td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;boolean</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#ready()">ready</a></b>()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells whether this stream is ready to be read.</td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;void</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#reset()">reset</a></b>()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the stream. </td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;long</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#skip(long)">skip</a></b>(long&nbsp;charsToSkip)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skip characters. </td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td align="right" valign="top" width="1%"><font size="-1">
<code>&nbsp;void</code></font></td>
<td><code><b><a href="ifsfilereaderjavadoc.htm#unlockBytes(com.ibm.as400.access.IFSKey)">unlockBytes</a></b>(<a href="javadoc/com/ibm/as400/access/IFSKey.html">IFSKey</a>&nbsp;key)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Undoes a lock on the file.</td>
</tr>
</tbody></table>
&nbsp;<a name="methods_inherited_from_class_java.io.Reader"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableSubHeadingColor" bgcolor="#eeeeff">
<td><b>Methods inherited from class java.io.<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></b></td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#mark(int)">mark</a></code></td>
</tr>
</tbody></table>
&nbsp;<a name="methods_inherited_from_class_java.lang.Object"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableSubHeadingColor" bgcolor="#eeeeff">
<td><b>Methods inherited from class java.lang.<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">Object</a></b></td>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()">clone</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()">finalize</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()">getClass</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()">hashCode</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()">notify</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()">notifyAll</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()">toString</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()">wait</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)">wait</a>, <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long,int)">wait</a></code></td>
</tr>
</tbody></table>
&nbsp;
</p><p>
<!-- ============ FIELD DETAIL =========== -->
<a name="field_detail"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableHeadingColor" bgcolor="#ccccff">
<td colspan="1"><font size="+2">
<b>Field Detail</b></font></td>
</tr>
</tbody></table>
<a name="SHARE_ALL"><!-- --></a></p><h3>
SHARE_ALL</h3>
<pre>public static final int <b>SHARE_ALL</b></pre>
<dl>
<dd>Share option that allows read and write access by other users.
<p>
</p><dl>
<dt><b>See Also:</b></dt><dd><a href="javadoc/constant-values.html#com.ibm.as400.access.IFSFileReader.SHARE_ALL">Constant Field Values</a></dd></dl>
</dd></dl>
<hr>
<a name="SHARE_NONE"><!-- --></a><h3>
SHARE_NONE</h3>
<pre>public static final int <b>SHARE_NONE</b></pre>
<dl>
<dd>Share option that does not allow read or write access by other users.
<p>
</p><dl>
<dt><b>See Also:</b></dt><dd><a href="javadoc/constant-values.html#com.ibm.as400.access.IFSFileReader.SHARE_NONE">Constant Field Values</a></dd></dl>
</dd></dl>
<hr>
<a name="SHARE_READERS"><!-- --></a><h3>
SHARE_READERS</h3>
<pre>public static final int <b>SHARE_READERS</b></pre>
<dl>
<dd>Share option that allows only read access by other users.
<p>
</p><dl>
<dt><b>See Also:</b></dt><dd><a href="javadoc/constant-values.html#com.ibm.as400.access.IFSFileReader.SHARE_READERS">Constant Field Values</a></dd></dl>
</dd></dl>
<hr>
<a name="SHARE_WRITERS"><!-- --></a><h3>
SHARE_WRITERS</h3>
<pre>public static final int <b>SHARE_WRITERS</b></pre>
<dl>
<dd>Share option that allows only write access by other users.
<p>
</p><dl>
<dt><b>See Also:</b></dt><dd><a href="javadoc/constant-values.html#com.ibm.as400.access.IFSFileReader.SHARE_WRITERS">Constant Field Values</a></dd></dl>
</dd></dl>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<a name="constructor_detail"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableHeadingColor" bgcolor="#ccccff">
<td colspan="1"><font size="+2">
<b>Constructor Detail</b></font></td>
</tr>
</tbody></table>
<a name="IFSFileReader(com.ibm.as400.access.IFSFile)"><!-- --></a><h3>
IFSFileReader</h3>
<pre>public <b>IFSFileReader</b>(<a href="javadoc/com/ibm/as400/access/IFSFile.html">IFSFile</a>&nbsp;file)
throws <a href="javadoc/com/ibm/as400/access/AS400SecurityException.html">AS400SecurityException</a>,
<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Constructs an IFSFileReader object.
Other readers and writers are allowed to access the file.
The file is opened if it exists; otherwise an exception is thrown.
The file's CCSID is obtained by referencing the file's "coded character set ID" tag on the server.
Other readers and writers are allowed to access the file.
<p>
</p></dd><dt><b>Parameters:</b></dt><dd><code>file</code> - The file to be opened for reading.
</dd><dt><b>Throws:</b><a href="javadoc/com/ibm/as400/access/AS400SecurityException.html">AS400SecurityException</a> - If a security or authority error occurs.
</dd><dd><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a> - If an error occurs while communicating with the server.</dd></dl>
<hr>
<a name="IFSFileReader(com.ibm.as400.access.IFSFile, int)"><!-- --></a><h3>
IFSFileReader</h3>
<pre>public <b>IFSFileReader</b>(<a href="javadoc/com/ibm/as400/access/IFSFile.html">IFSFile</a>&nbsp;file,
int&nbsp;ccsid)
throws <a href="javadoc/com/ibm/as400/access/AS400SecurityException.html">AS400SecurityException</a>,
<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Constructs an IFSFileReader object.
The file is opened if it exists; otherwise an exception is thrown.
Other readers and writers are allowed to access the file.
<p>
</p></dd><dt><b>Parameters:</b></dt><dd><code>file</code> - The file to be opened for reading.</dd><dd><code>ccsid</code> - The CCSID that the file data is currently in.
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="javadoc/com/ibm/as400/access/AS400SecurityException.html">AS400SecurityException</a></code> - If a security or authority error occurs.
</dd><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
<hr>
<a name="IFSFileReader(com.ibm.as400.access.IFSFile, int, int)"><!-- --></a><h3>
IFSFileReader</h3>
<pre>public <b>IFSFileReader</b>(<a href="javadoc/com/ibm/as400/access/IFSFile.html">IFSFile</a>&nbsp;file,
int&nbsp;ccsid,
int&nbsp;shareOption)
throws <a href="javadoc/com/ibm/as400/access/AS400SecurityException.html">AS400SecurityException</a>,
<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Constructs an IFSFileReader object.
The file is opened if it exists; otherwise an exception is thrown.
<p>
</p></dd><dt><b>Parameters:</b></dt><dd><code>file</code> - The file to be opened for reading.</dd><dd><code>ccsid</code> - The CCSID that the file data is currently in.</dd><dd><code>shareOption</code> - Indicates how users can access the file. <ul><li>SHARE_ALL Share access with readers and writers</li><li>SHARE_NONE Share access with none</li><li>SHARE_READERS Share access with readers</li><li>SHARE_WRITERS Share access with writers</li></ul>
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="javadoc/com/ibm/as400/access/AS400SecurityException.html">AS400SecurityException</a></code> - If a security or authority error occurs.
</dd><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
<hr>
<a name="IFSFileReader(com.ibm.as400.access.IFSFileDescriptor)"><!-- --></a><h3>
IFSFileReader</h3>
<pre>public <b>IFSFileReader</b>(<a href="javadoc/com/ibm/as400/access/IFSFileDescriptor.html">IFSFileDescriptor</a>&nbsp;fd)
throws <a href="javadoc/com/ibm/as400/access/AS400SecurityException.html">AS400SecurityException</a>,
<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Constructs an IFSFileReader object.
The file is opened if it exists; otherwise an exception is thrown.
<p>
</p></dd><dt><b>Parameters:</b></dt><dd><code>fd</code> - The file descriptor to be opened for reading.</dd></dl>
<!-- ============ METHOD DETAIL ========== -->
<a name="method_detail"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableHeadingColor" bgcolor="#ccccff">
<td colspan="1"><font size="+2">
<b>Method Detail</b></font></td>
</tr>
</tbody></table>
<a name="close()"><!-- --></a><h3>
close</h3>
<pre>public void <b>close</b>()
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Closes the stream. Once a stream has been closed, further read(),
ready(), mark(), or reset() invocations will throw an IOException.
Closing a previously-closed stream, however, has no effect.
<p>
</p></dd><dd><dl>
<dt><b>Specified by:</b></dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#close()">close</a></code> in class <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></code></dd></dl>
</dd>
<dd><dl>
<dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
</dd>
</dl>
<hr>
<a name="getCCSID()"><!-- --></a><h3>
getCCSID</h3>
<pre>public int <b>getCCSID</b>()</pre>
<dl>
<dd>Returns the CCSID used by this IFSFileReader.
<p>
</p></dd><dd><dl>
<dt><b>Returns:</b></dt><dd>The CCSID, or -1 if the CCSID is not known.</dd></dl>
</dd>
</dl>
<hr>
<a name="getEncoding()"><!-- --></a><h3>
getEncoding</h3>
<pre>public <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</a> <b>getEncoding</b>()</pre>
<dl>
<dd>Returns the encoding used by this IFSFileReader.
<p>
</p></dd><dd><dl>
<dt><b>Returns:</b></dt><dd>The encoding, or null if the encoding is not known.</dd></dl>
</dd>
</dl>
<hr>
<a name="markSupported()"><!-- --></a><h3>
markSupported</h3>
<pre>public boolean <b>markSupported</b>()</pre>
<dl>
<dd>IFSFileReader does not support the mark() operation.
<p>
</p></dd><dd><dl>
<dt><b>Overrides:</b></dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#markSupported()">markSupported</a></code> in class <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></code></dd></dl>
</dd>
<dd><dl>
<dt><b>Returns:</b></dt><dd>false.</dd></dl>
</dd>
</dl>
<hr>
<a name="read()"><!-- --></a><h3>
read</h3>
<pre>public int <b>read</b>()
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Reads a single character.
<p>
</p></dd><dd><dl>
<dt><b>Overrides:</b></dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#read()">read</a></code> in class <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></code></dd></dl>
</dd>
<dd><dl>
<dt><b>Returns:</b></dt><dd>The character read, or -1 if the end of the stream has been reached.
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
</dd>
</dl>
<hr>
<a name="read(char[])"><!-- --></a><h3>
read</h3>
<pre>public int <b>read</b>(char[]&nbsp;cbuf)
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Reads characters into an array. This method will block until some
input is available, an I/O error occurs, or the end of the stream is
reached.
<p>
</p></dd><dd><dl>
<dt><b>Overrides:</b></dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#read(char%5B%5D)">read</a></code> in class <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></code></dd></dl>
</dd>
<dd><dl>
<dt><b>Parameters:</b></dt><dd><code>cbuf</code> - Destination buffer.
</dd><dt><b>Returns:</b></dt><dd>The number of characters read, or -1 if the end of the stream has been reached.
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
</dd>
</dl>
<hr>
<a name="read(char[], int, int)"><!-- --></a><h3>
read</h3>
<pre>public int <b>read</b>(char[]&nbsp;cbuf,
int&nbsp;off,
int&nbsp;len)
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Reads characters into a portion of an array. This method will block
until some input is available, an I/O error occurs, or the end of the
stream is reached.
<p>
</p></dd><dd><dl>
<dt><b>Specified by:</b></dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#read(char%5B%5D,int,int)">read</a></code> in class <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></code></dd></dl>
</dd>
<dd><dl>
<dt><b>Parameters:</b></dt><dd><code>cbuf</code> - Destination buffer.</dd><dd><code>off</code> - Offset at which to start storing characters.</dd><dd><code>len</code> - Maximum number of characters to read.
</dd><dt><b>Returns:</b></dt><dd>The number of characters read, or -1 if the end of the stream has been reached.
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
</dd>
</dl>
<hr>
<a name="ready()"><!-- --></a><h3>
ready</h3>
<pre>public boolean <b>ready</b>()
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Tells whether this stream is ready to be read.
<p>
</p></dd><dd><dl>
<dt><b>Overrides:</b></dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#ready()">ready</a></code> in class <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></code></dd></dl>
</dd>
<dd><dl>
<dt><b>Returns:</b></dt><dd><tt>true</tt> if the next read() is guaranteed not to block for input, <tt>false</tt> otherwise. Note that returning false does not guarantee that the next read will block.
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
</dd>
</dl>
<hr>
<a name="reset()"><!-- --></a><h3>
reset</h3>
<pre>public void <b>reset</b>()
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Resets the stream. After this call, the stream will read from the beginning.
<p>
</p></dd><dd><dl>
<dt><b>Overrides:</b></dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#reset()">reset</a></code> in class <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></code></dd></dl>
</dd>
<dd><dl>
<dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
</dd>
</dl>
<hr>
<a name="skip(long)"><!-- --></a><h3>
skip</h3>
<pre>public long <b>skip</b>(long&nbsp;charsToSkip)
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Skip characters. This method will block until some characters are
available, an I/O error occurs, or the end of the stream is reached.
<p>
</p></dd><dd><dl>
<dt><b>Overrides:</b></dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html#skip(long)">skip</a></code> in class <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a></code></dd></dl>
</dd>
<dd><dl>
<dt><b>Parameters:</b></dt><dd><code>charsToSkip</code> - The number of characters to skip.
</dd><dt><b>Returns:</b></dt><dd>The number of characters actually skipped.
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd></dl>
</dd>
</dl>
<hr>
<a name="lockBytes(int)"><!-- --></a><h3>
lockBytes</h3>
<pre>public <a href="javadoc/com/ibm/as400/access/IFSKey.html">IFSKey</a> <b>lockBytes</b>(int&nbsp;length)
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Places a lock on the file at the current position for the specified
number of bytes.
<p>
</p></dd><dd><dl>
<dt><b>Parameters:</b></dt><dd><code>length</code> - The number of bytes to lock.
</dd><dt><b>Returns:</b></dt><dd>The key for undoing this lock.
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd><dt><b>See Also:</b></dt><dd><a href="ifsfilereaderjavadoc.htm#unlockBytes(com.ibm.as400.access.IFSKey)"><code>unlockBytes(com.ibm.as400.access.IFSKey)</code></a></dd></dl>
</dd>
</dl>
<hr>
<a name="unlockBytes(com.ibm.as400.access.IFSKey)"><!-- --></a><h3>
unlockBytes</h3>
<pre>public void <b>unlockBytes</b>(<a href="javadoc/com/ibm/as400/access/IFSKey.html">IFSKey</a>&nbsp;key)
throws <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></pre>
<dl>
<dd>Undoes a lock on the file.
<p>
</p></dd><dd><dl>
<dt><b>Parameters:</b></dt><dd><code>key</code> - The key for the lock.
</dd><dt><b>Throws:</b>
</dt><dd><code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html">IOException</a></code> - If an error occurs while communicating with the server.</dd><dt><b>See Also:</b></dt><dd><a href="ifsfilereaderjavadoc.htm#lockBytes(int)"><code>lockBytes(int)</code></a></dd></dl>
</dd>
</dl>
<!-- ========= END OF CLASS DATA ========= -->
<hr>
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_bottom"><!-- --></a>
<table border="0" cellpadding="1" cellspacing="0" width="100%">
<tbody><tr>
<td colspan="3" class="NavBarCell1" bgcolor="#eeeeff">
<a name="navbar_bottom_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tbody><tr align="center" valign="top">
<td class="NavBarCell1" bgcolor="#eeeeff"> <a href="javadoc/overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
<td class="NavBarCell1" bgcolor="#eeeeff"> <a href="javadoc/com/ibm/as400/access/package-summary.html"><font class="NavBarFont1"><b>Package</b></font></a>&nbsp;</td>
<td class="NavBarCell1Rev" bgcolor="#ffffff"> &nbsp;<font class="NavBarFont1Rev"><b>Class</b></font>&nbsp;</td>
<td class="NavBarCell1" bgcolor="#eeeeff"> <a href="javadoc/com/ibm/as400/access/package-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
<td class="NavBarCell1" bgcolor="#eeeeff"> <a href="javadoc/deprecated-list.html"><font class="NavBarFont1"><b>Deprecated</b></font></a>&nbsp;</td>
<td class="NavBarCell1" bgcolor="#eeeeff"> <a href="javadoc/index-all.html"><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
<td class="NavBarCell1" bgcolor="#eeeeff"> <a href="javadoc/help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
</tr>
</tbody></table>
</td>
<td rowspan="3" align="right" valign="top"><em>
</em>
</td>
</tr>
<tr>
<td class="NavBarCell2" bgcolor="white"><font size="-2">
&nbsp;<a href="javadoc/com/ibm/as400/access/IFSFileOutputStream.html"><b>PREV CLASS</b></a>&nbsp;
&nbsp;<a href="ifsfilewriterjavadoc.htm"><b>NEXT CLASS</b></a></font></td>
<td class="NavBarCell2" bgcolor="white"><font size="-2">
<a href="javadoc/index.html" target="_top"><b>FRAMES</b></a> &nbsp;
&nbsp;<a href="ifsfilereaderjavadoc.htm" target="_top"><b>NO FRAMES</b></a> &nbsp;
&nbsp;
<noscript>
<A HREF="javadoc/allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</noscript>
</font></td>
</tr>
<tr>
<td class="NavBarCell3" valign="top"><font size="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<a href="#field_summary">FIELD</a>&nbsp;|&nbsp;<a href="#constructor_summary">CONSTR</a>&nbsp;|&nbsp;<a href="#method_summary">METHOD</a></font></td>
<td class="NavBarCell3" valign="top"><font size="-2">
DETAIL:&nbsp;<a href="#field_detail">FIELD</a>&nbsp;|&nbsp;<a href="#constructor_detail">CONSTR</a>&nbsp;|&nbsp;<a href="#method_detail">METHOD</a></font></td>
</tr>
</tbody></table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
</body></html>