1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
5 <!-- Generated by javadoc on Mon Jun 09 15:53:37 PDT 2003 -->
7 FileInputStream (Java AFS API)
9 <META NAME="keywords" CONTENT="org.openafs.jafs.FileInputStream,FileInputStream class">
10 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
15 parent.document.title="FileInputStream (Java AFS API)";
18 <BODY BGCOLOR="white" onload="asd();">
20 <!-- ========== START OF NAVBAR ========== -->
21 <A NAME="navbar_top"><!-- --></A>
22 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
24 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
25 <A NAME="navbar_top_firstrow"><!-- --></A>
26 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
27 <TR ALIGN="center" VALIGN="top">
28 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
29 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
30 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FileInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
31 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
32 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
33 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
34 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
38 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
39 <B>JAFS API v2</B></EM>
44 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
45 <A HREF="../../../org/openafs/jafs/File.html"><B>PREV CLASS</B></A>
46 <A HREF="../../../org/openafs/jafs/FileOutputStream.html"><B>NEXT CLASS</B></A></FONT></TD>
47 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
48 <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
49 <A HREF="FileInputStream.html" TARGET="_top"><B>NO FRAMES</B></A>
54 document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
59 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
64 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
65 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
66 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
67 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
70 <!-- =========== END OF NAVBAR =========== -->
73 <!-- ======== START OF CLASS DATA ======== -->
76 org.openafs.jafs</FONT>
78 Class FileInputStream</H2>
80 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">java.lang.Object</A>
82 +--<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html">java.io.InputStream</A>
84 +--<B>org.openafs.jafs.FileInputStream</B>
88 <DT>public class <B>FileInputStream</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html">InputStream</A></DL>
91 This class is a file input stream for files within AFS.
92 It is an input stream for reading data from a
93 <code><A HREF="../../../org/openafs/jafs/File.html"><CODE>File</CODE></A></code>.
98 <DT><B>Version:</B></DT>
99 <DD>2.1, 08/03/2001</DD>
100 <DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/File.html"><CODE>File</CODE></A>,
101 <A HREF="../../../org/openafs/jafs/FileOutputStream.html"><CODE>FileOutputStream</CODE></A>,
102 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/FileInputStream.html"><CODE>FileInputStream</CODE></A></DL>
106 <!-- ======== NESTED CLASS SUMMARY ======== -->
109 <!-- =========== FIELD SUMMARY =========== -->
112 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
114 <A NAME="constructor_summary"><!-- --></A>
115 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
116 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
117 <TD COLSPAN=2><FONT SIZE="+2">
118 <B>Constructor Summary</B></FONT></TD>
120 <TR BGCOLOR="white" CLASS="TableRowColor">
121 <TD><CODE><B><A HREF="../../../org/openafs/jafs/FileInputStream.html#FileInputStream(org.openafs.jafs.File)">FileInputStream</A></B>(<A HREF="../../../org/openafs/jafs/File.html">File</A> file)</CODE>
124 Creates a <code>FileInputStream</code> by
125 opening a connection to an actual AFS file,
126 the file represented by file <code>file</code>
127 in the AFS file system.</TD>
129 <TR BGCOLOR="white" CLASS="TableRowColor">
130 <TD><CODE><B><A HREF="../../../org/openafs/jafs/FileInputStream.html#FileInputStream(java.lang.String)">FileInputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> name)</CODE>
133 Creates a <code>FileInputStream</code> by
134 opening a connection to an actual AFS file,
135 the file named by the path name <code>name</code>
136 in the AFS file system.</TD>
140 <!-- ========== METHOD SUMMARY =========== -->
142 <A NAME="method_summary"><!-- --></A>
143 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
144 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
145 <TD COLSPAN=2><FONT SIZE="+2">
146 <B>Method Summary</B></FONT></TD>
148 <TR BGCOLOR="white" CLASS="TableRowColor">
149 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150 <CODE> void</CODE></FONT></TD>
151 <TD><CODE><B><A HREF="../../../org/openafs/jafs/FileInputStream.html#close()">close</A></B>()</CODE>
154 Closes this file input stream and releases any system resources
155 associated with the stream.</TD>
157 <TR BGCOLOR="white" CLASS="TableRowColor">
158 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159 <CODE> int</CODE></FONT></TD>
160 <TD><CODE><B><A HREF="../../../org/openafs/jafs/FileInputStream.html#read()">read</A></B>()</CODE>
163 Reads the next byte of data from this input stream. </TD>
165 <TR BGCOLOR="white" CLASS="TableRowColor">
166 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167 <CODE> int</CODE></FONT></TD>
168 <TD><CODE><B><A HREF="../../../org/openafs/jafs/FileInputStream.html#read(byte[])">read</A></B>(byte[] b)</CODE>
171 Reads up to <code>b.length</code> bytes of data from this input
172 stream into an array of bytes. </TD>
174 <TR BGCOLOR="white" CLASS="TableRowColor">
175 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176 <CODE> int</CODE></FONT></TD>
177 <TD><CODE><B><A HREF="../../../org/openafs/jafs/FileInputStream.html#read(byte[], int, int)">read</A></B>(byte[] b,
182 Reads up to <code>len</code> bytes of data from this input stream
183 into an array of bytes. </TD>
185 <TR BGCOLOR="white" CLASS="TableRowColor">
186 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187 <CODE> long</CODE></FONT></TD>
188 <TD><CODE><B><A HREF="../../../org/openafs/jafs/FileInputStream.html#skip(long)">skip</A></B>(long n)</CODE>
191 Skips over and discards <code>n</code> bytes of data from the
195 <A NAME="methods_inherited_from_class_java.io.InputStream"><!-- --></A>
196 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
197 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
198 <TD><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html">InputStream</A></B></TD>
200 <TR BGCOLOR="white" CLASS="TableRowColor">
201 <TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#available()">available</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#mark(int)">mark</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#markSupported()">markSupported</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#reset()">reset</A></CODE></TD>
204 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
205 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
206 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
207 <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A></B></TD>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
216 <!-- ============ FIELD DETAIL =========== -->
219 <!-- ========= CONSTRUCTOR DETAIL ======== -->
221 <A NAME="constructor_detail"><!-- --></A>
222 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
223 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
224 <TD COLSPAN=1><FONT SIZE="+2">
225 <B>Constructor Detail</B></FONT></TD>
229 <A NAME="FileInputStream(java.lang.String)"><!-- --></A><H3>
232 public <B>FileInputStream</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> name)
233 throws <A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></PRE>
235 <DD>Creates a <code>FileInputStream</code> by
236 opening a connection to an actual AFS file,
237 the file named by the path name <code>name</code>
238 in the AFS file system.
240 <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the file to read from
242 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></CODE> - If an AFS specific error occurs,
243 if the file does not, or cannot be opened for any
244 other reason, including authorization.</DL>
247 <A NAME="FileInputStream(org.openafs.jafs.File)"><!-- --></A><H3>
250 public <B>FileInputStream</B>(<A HREF="../../../org/openafs/jafs/File.html">File</A> file)
251 throws <A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></PRE>
253 <DD>Creates a <code>FileInputStream</code> by
254 opening a connection to an actual AFS file,
255 the file represented by file <code>file</code>
256 in the AFS file system.
258 <DT><B>Parameters:</B><DD><CODE>file</CODE> - an AFS file object representing a file to read from
260 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></CODE> - If an AFS specific error occurs,
261 if the file does not, or cannot be opened for any
262 other reason, including authorization.</DL>
264 <!-- ============ METHOD DETAIL ========== -->
266 <A NAME="method_detail"><!-- --></A>
267 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
268 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
269 <TD COLSPAN=1><FONT SIZE="+2">
270 <B>Method Detail</B></FONT></TD>
274 <A NAME="read()"><!-- --></A><H3>
277 public int <B>read</B>()
278 throws <A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></PRE>
280 <DD>Reads the next byte of data from this input stream. The value
281 byte is returned as an <code>int</code> in the range
282 <code>0</code> to <code>255</code>. If no byte is available
283 because the end of the stream has been reached, the value
284 <code>-1</code> is returned. This method blocks until input data
285 is available, the end of the stream is detected, or an exception
288 <p>This method simply performs <code>in.read()</code> and returns
292 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#read()">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html">InputStream</A></CODE></DL>
296 <DT><B>Returns:</B><DD>the next byte of data, or <code>-1</code> if the end of the
299 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></CODE> - if an I/O or other file related error occurs.<DT><B>See Also:</B><DD><CODE>FileInputStream.read()</CODE></DL>
304 <A NAME="read(byte[])"><!-- --></A><H3>
307 public int <B>read</B>(byte[] b)
308 throws <A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></PRE>
310 <DD>Reads up to <code>b.length</code> bytes of data from this input
311 stream into an array of bytes. This method blocks until some input
315 <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#read(byte[])">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html">InputStream</A></CODE></DL>
318 <DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read.
319 <DT><B>Returns:</B><DD>the total number of bytes read into the buffer, or
320 <code>-1</code> if there is no more data because the end of
321 the file has been reached.
323 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></CODE> - if an I/O or other file related error occurs.</DL>
328 <A NAME="read(byte[], int, int)"><!-- --></A><H3>
331 public int <B>read</B>(byte[] b,
334 throws <A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></PRE>
336 <DD>Reads up to <code>len</code> bytes of data from this input stream
337 into an array of bytes. This method blocks until some input is
341 <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#read(byte[], int, int)">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html">InputStream</A></CODE></DL>
344 <DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read.<DD><CODE>off</CODE> - the start offset of the data.<DD><CODE>len</CODE> - the maximum number of bytes read.
345 <DT><B>Returns:</B><DD>the total number of bytes read into the buffer, or
346 <code>-1</code> if there is no more data because the end of
347 the file has been reached.
349 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></CODE> - if an I/O or other file related error occurs.</DL>
354 <A NAME="skip(long)"><!-- --></A><H3>
357 public long <B>skip</B>(long n)
358 throws <A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></PRE>
360 <DD>Skips over and discards <code>n</code> bytes of data from the
361 input stream. The <code>skip</code> method may, for a variety of
362 reasons, end up skipping over some smaller number of bytes,
363 possibly <code>0</code>. The actual number of bytes skipped is returned.
366 <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#skip(long)">skip</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html">InputStream</A></CODE></DL>
369 <DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of bytes to be skipped.
370 <DT><B>Returns:</B><DD>the actual number of bytes skipped.
372 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></CODE> - if an I/O or other file related error occurs.</DL>
377 <A NAME="close()"><!-- --></A><H3>
380 public void <B>close</B>()
381 throws <A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></PRE>
383 <DD>Closes this file input stream and releases any system resources
384 associated with the stream.
387 <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html#close()">close</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html">InputStream</A></CODE></DL>
392 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSFileException.html">AFSFileException</A></CODE> - if an I/O or other file related error occurs.</DL>
395 <!-- ========= END OF CLASS DATA ========= -->
398 <!-- ========== START OF NAVBAR ========== -->
399 <A NAME="navbar_bottom"><!-- --></A>
400 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
402 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
403 <A NAME="navbar_bottom_firstrow"><!-- --></A>
404 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
405 <TR ALIGN="center" VALIGN="top">
406 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
407 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
408 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FileInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
409 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
410 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
411 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
412 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
416 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
417 <B>JAFS API v2</B></EM>
422 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
423 <A HREF="../../../org/openafs/jafs/File.html"><B>PREV CLASS</B></A>
424 <A HREF="../../../org/openafs/jafs/FileOutputStream.html"><B>NEXT CLASS</B></A></FONT></TD>
425 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
426 <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
427 <A HREF="FileInputStream.html" TARGET="_top"><B>NO FRAMES</B></A>
432 document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
437 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
442 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
443 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
444 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
445 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
448 <!-- =========== END OF NAVBAR =========== -->