source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/fs/BufferedFSInputStream.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 29.0 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:50 UTC 2009 -->
6<TITLE>
7BufferedFSInputStream (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="BufferedFSInputStream (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BufferedFSInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/hadoop/fs/BlockLocation.html" title="class in org.apache.hadoop.fs"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/hadoop/fs/ChecksumException.html" title="class in org.apache.hadoop.fs"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/fs/BufferedFSInputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="BufferedFSInputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.io.BufferedInputStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.fs</FONT>
92<BR>
93Class BufferedFSInputStream</H2>
94<PRE>
95<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</A>
97      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterInputStream</A>
98          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">java.io.BufferedInputStream</A>
99              <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.fs.BufferedFSInputStream</B>
100</PRE>
101<DL>
102<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>, <A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html" title="interface in org.apache.hadoop.fs">PositionedReadable</A>, <A HREF="../../../../org/apache/hadoop/fs/Seekable.html" title="interface in org.apache.hadoop.fs">Seekable</A></DD>
103</DL>
104<HR>
105<DL>
106<DT><PRE>public class <B>BufferedFSInputStream</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A><DT>implements <A HREF="../../../../org/apache/hadoop/fs/Seekable.html" title="interface in org.apache.hadoop.fs">Seekable</A>, <A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html" title="interface in org.apache.hadoop.fs">PositionedReadable</A></DL>
107</PRE>
108
109<P>
110A class optimizes reading from FSInputStream by bufferring
111<P>
112
113<P>
114<HR>
115
116<P>
117<!-- =========== FIELD SUMMARY =========== -->
118
119<A NAME="field_summary"><!-- --></A>
120<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
121<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
122<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
123<B>Field Summary</B></FONT></TH>
124</TR>
125</TABLE>
126&nbsp;<A NAME="fields_inherited_from_class_java.io.BufferedInputStream"><!-- --></A>
127<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
129<TH ALIGN="left"><B>Fields inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></B></TH>
130</TR>
131<TR BGCOLOR="white" CLASS="TableRowColor">
132<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#buf" title="class or interface in java.io">buf</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#count" title="class or interface in java.io">count</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#marklimit" title="class or interface in java.io">marklimit</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#markpos" title="class or interface in java.io">markpos</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#pos" title="class or interface in java.io">pos</A></CODE></TD>
133</TR>
134</TABLE>
135&nbsp;<A NAME="fields_inherited_from_class_java.io.FilterInputStream"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
138<TH ALIGN="left"><B>Fields inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</A></B></TH>
139</TR>
140<TR BGCOLOR="white" CLASS="TableRowColor">
141<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterInputStream.html?is-external=true#in" title="class or interface in java.io">in</A></CODE></TD>
142</TR>
143</TABLE>
144&nbsp;
145<!-- ======== CONSTRUCTOR SUMMARY ======== -->
146
147<A NAME="constructor_summary"><!-- --></A>
148<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
149<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
150<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
151<B>Constructor Summary</B></FONT></TH>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/BufferedFSInputStream.html#BufferedFSInputStream(org.apache.hadoop.fs.FSInputStream, int)">BufferedFSInputStream</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html" title="class in org.apache.hadoop.fs">FSInputStream</A>&nbsp;in,
155                      int&nbsp;size)</CODE>
156
157<BR>
158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>BufferedFSInputStream</code>
159 with the specified buffer size,
160 and saves its  argument, the input stream
161 <code>in</code>, for later use.</TD>
162</TR>
163</TABLE>
164&nbsp;
165<!-- ========== METHOD SUMMARY =========== -->
166
167<A NAME="method_summary"><!-- --></A>
168<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
169<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
170<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
171<B>Method Summary</B></FONT></TH>
172</TR>
173<TR BGCOLOR="white" CLASS="TableRowColor">
174<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
175<CODE>&nbsp;long</CODE></FONT></TD>
176<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/BufferedFSInputStream.html#getPos()">getPos</A></B>()</CODE>
177
178<BR>
179&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the current offset from the start of the file</TD>
180</TR>
181<TR BGCOLOR="white" CLASS="TableRowColor">
182<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
183<CODE>&nbsp;int</CODE></FONT></TD>
184<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/BufferedFSInputStream.html#read(long, byte[], int, int)">read</A></B>(long&nbsp;position,
185     byte[]&nbsp;buffer,
186     int&nbsp;offset,
187     int&nbsp;length)</CODE>
188
189<BR>
190&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read upto the specified number of bytes, from a given
191 position within a file, and return the number of bytes read.</TD>
192</TR>
193<TR BGCOLOR="white" CLASS="TableRowColor">
194<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195<CODE>&nbsp;void</CODE></FONT></TD>
196<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/BufferedFSInputStream.html#readFully(long, byte[])">readFully</A></B>(long&nbsp;position,
197          byte[]&nbsp;buffer)</CODE>
198
199<BR>
200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read number of bytes equalt to the length of the buffer, from a given
201 position within a file.</TD>
202</TR>
203<TR BGCOLOR="white" CLASS="TableRowColor">
204<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205<CODE>&nbsp;void</CODE></FONT></TD>
206<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/BufferedFSInputStream.html#readFully(long, byte[], int, int)">readFully</A></B>(long&nbsp;position,
207          byte[]&nbsp;buffer,
208          int&nbsp;offset,
209          int&nbsp;length)</CODE>
210
211<BR>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the specified number of bytes, from a given
213 position within a file.</TD>
214</TR>
215<TR BGCOLOR="white" CLASS="TableRowColor">
216<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
217<CODE>&nbsp;void</CODE></FONT></TD>
218<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/BufferedFSInputStream.html#seek(long)">seek</A></B>(long&nbsp;pos)</CODE>
219
220<BR>
221&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Seek to the given offset from the start of the file.</TD>
222</TR>
223<TR BGCOLOR="white" CLASS="TableRowColor">
224<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
225<CODE>&nbsp;boolean</CODE></FONT></TD>
226<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/BufferedFSInputStream.html#seekToNewSource(long)">seekToNewSource</A></B>(long&nbsp;targetPos)</CODE>
227
228<BR>
229&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Seeks a different copy of the data.</TD>
230</TR>
231<TR BGCOLOR="white" CLASS="TableRowColor">
232<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
233<CODE>&nbsp;long</CODE></FONT></TD>
234<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/BufferedFSInputStream.html#skip(long)">skip</A></B>(long&nbsp;n)</CODE>
235
236<BR>
237&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
238</TR>
239</TABLE>
240&nbsp;<A NAME="methods_inherited_from_class_java.io.BufferedInputStream"><!-- --></A>
241<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
242<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
243<TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></B></TH>
244</TR>
245<TR BGCOLOR="white" CLASS="TableRowColor">
246<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#available()" title="class or interface in java.io">available</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#close()" title="class or interface in java.io">close</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#mark(int)" title="class or interface in java.io">mark</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#markSupported()" title="class or interface in java.io">markSupported</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#read()" title="class or interface in java.io">read</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#read(byte[], int, int)" title="class or interface in java.io">read</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#reset()" title="class or interface in java.io">reset</A></CODE></TD>
247</TR>
248</TABLE>
249&nbsp;<A NAME="methods_inherited_from_class_java.io.FilterInputStream"><!-- --></A>
250<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
251<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
252<TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</A></B></TH>
253</TR>
254<TR BGCOLOR="white" CLASS="TableRowColor">
255<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterInputStream.html?is-external=true#read(byte[])" title="class or interface in java.io">read</A></CODE></TD>
256</TR>
257</TABLE>
258&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
259<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
260<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
261<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
262</TR>
263<TR BGCOLOR="white" CLASS="TableRowColor">
264<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
265</TR>
266</TABLE>
267&nbsp;
268<P>
269
270<!-- ========= CONSTRUCTOR DETAIL ======== -->
271
272<A NAME="constructor_detail"><!-- --></A>
273<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
274<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
275<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
276<B>Constructor Detail</B></FONT></TH>
277</TR>
278</TABLE>
279
280<A NAME="BufferedFSInputStream(org.apache.hadoop.fs.FSInputStream, int)"><!-- --></A><H3>
281BufferedFSInputStream</H3>
282<PRE>
283public <B>BufferedFSInputStream</B>(<A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html" title="class in org.apache.hadoop.fs">FSInputStream</A>&nbsp;in,
284                             int&nbsp;size)</PRE>
285<DL>
286<DD>Creates a <code>BufferedFSInputStream</code>
287 with the specified buffer size,
288 and saves its  argument, the input stream
289 <code>in</code>, for later use.  An internal
290 buffer array of length  <code>size</code>
291 is created and stored in <code>buf</code>.
292<P>
293<DL>
294<DT><B>Parameters:</B><DD><CODE>in</CODE> - the underlying input stream.<DD><CODE>size</CODE> - the buffer size.
295<DT><B>Throws:</B>
296<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if size <= 0.</DL>
297</DL>
298
299<!-- ============ METHOD DETAIL ========== -->
300
301<A NAME="method_detail"><!-- --></A>
302<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
303<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
304<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
305<B>Method Detail</B></FONT></TH>
306</TR>
307</TABLE>
308
309<A NAME="getPos()"><!-- --></A><H3>
310getPos</H3>
311<PRE>
312public long <B>getPos</B>()
313            throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
314<DL>
315<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html#getPos()">Seekable</A></CODE></B></DD>
316<DD>Return the current offset from the start of the file
317<P>
318<DD><DL>
319<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html#getPos()">getPos</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html" title="interface in org.apache.hadoop.fs">Seekable</A></CODE></DL>
320</DD>
321<DD><DL>
322
323<DT><B>Throws:</B>
324<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
325</DD>
326</DL>
327<HR>
328
329<A NAME="skip(long)"><!-- --></A><H3>
330skip</H3>
331<PRE>
332public long <B>skip</B>(long&nbsp;n)
333          throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
334<DL>
335<DD><DL>
336<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true#skip(long)" title="class or interface in java.io">skip</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
337</DD>
338<DD><DL>
339
340<DT><B>Throws:</B>
341<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
342</DD>
343</DL>
344<HR>
345
346<A NAME="seek(long)"><!-- --></A><H3>
347seek</H3>
348<PRE>
349public void <B>seek</B>(long&nbsp;pos)
350          throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
351<DL>
352<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html#seek(long)">Seekable</A></CODE></B></DD>
353<DD>Seek to the given offset from the start of the file.
354 The next read() will be from that location.  Can't
355 seek past the end of the file.
356<P>
357<DD><DL>
358<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html#seek(long)">seek</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html" title="interface in org.apache.hadoop.fs">Seekable</A></CODE></DL>
359</DD>
360<DD><DL>
361
362<DT><B>Throws:</B>
363<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
364</DD>
365</DL>
366<HR>
367
368<A NAME="seekToNewSource(long)"><!-- --></A><H3>
369seekToNewSource</H3>
370<PRE>
371public boolean <B>seekToNewSource</B>(long&nbsp;targetPos)
372                        throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
373<DL>
374<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html#seekToNewSource(long)">Seekable</A></CODE></B></DD>
375<DD>Seeks a different copy of the data.  Returns true if
376 found a new source, false otherwise.
377<P>
378<DD><DL>
379<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html#seekToNewSource(long)">seekToNewSource</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/fs/Seekable.html" title="interface in org.apache.hadoop.fs">Seekable</A></CODE></DL>
380</DD>
381<DD><DL>
382
383<DT><B>Throws:</B>
384<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
385</DD>
386</DL>
387<HR>
388
389<A NAME="read(long, byte[], int, int)"><!-- --></A><H3>
390read</H3>
391<PRE>
392public int <B>read</B>(long&nbsp;position,
393                byte[]&nbsp;buffer,
394                int&nbsp;offset,
395                int&nbsp;length)
396         throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
397<DL>
398<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html#read(long, byte[], int, int)">PositionedReadable</A></CODE></B></DD>
399<DD>Read upto the specified number of bytes, from a given
400 position within a file, and return the number of bytes read. This does not
401 change the current offset of a file, and is thread-safe.
402<P>
403<DD><DL>
404<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html#read(long, byte[], int, int)">read</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html" title="interface in org.apache.hadoop.fs">PositionedReadable</A></CODE></DL>
405</DD>
406<DD><DL>
407
408<DT><B>Throws:</B>
409<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
410</DD>
411</DL>
412<HR>
413
414<A NAME="readFully(long, byte[], int, int)"><!-- --></A><H3>
415readFully</H3>
416<PRE>
417public void <B>readFully</B>(long&nbsp;position,
418                      byte[]&nbsp;buffer,
419                      int&nbsp;offset,
420                      int&nbsp;length)
421               throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
422<DL>
423<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html#readFully(long, byte[], int, int)">PositionedReadable</A></CODE></B></DD>
424<DD>Read the specified number of bytes, from a given
425 position within a file. This does not
426 change the current offset of a file, and is thread-safe.
427<P>
428<DD><DL>
429<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html#readFully(long, byte[], int, int)">readFully</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html" title="interface in org.apache.hadoop.fs">PositionedReadable</A></CODE></DL>
430</DD>
431<DD><DL>
432
433<DT><B>Throws:</B>
434<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
435</DD>
436</DL>
437<HR>
438
439<A NAME="readFully(long, byte[])"><!-- --></A><H3>
440readFully</H3>
441<PRE>
442public void <B>readFully</B>(long&nbsp;position,
443                      byte[]&nbsp;buffer)
444               throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
445<DL>
446<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html#readFully(long, byte[])">PositionedReadable</A></CODE></B></DD>
447<DD>Read number of bytes equalt to the length of the buffer, from a given
448 position within a file. This does not
449 change the current offset of a file, and is thread-safe.
450<P>
451<DD><DL>
452<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html#readFully(long, byte[])">readFully</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/fs/PositionedReadable.html" title="interface in org.apache.hadoop.fs">PositionedReadable</A></CODE></DL>
453</DD>
454<DD><DL>
455
456<DT><B>Throws:</B>
457<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
458</DD>
459</DL>
460<!-- ========= END OF CLASS DATA ========= -->
461<HR>
462
463
464<!-- ======= START OF BOTTOM NAVBAR ====== -->
465<A NAME="navbar_bottom"><!-- --></A>
466<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
467<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
468<TR>
469<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
470<A NAME="navbar_bottom_firstrow"><!-- --></A>
471<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
472  <TR ALIGN="center" VALIGN="top">
473  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
474  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
475  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
476  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BufferedFSInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
477  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
478  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
479  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
480  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
481  </TR>
482</TABLE>
483</TD>
484<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
485</EM>
486</TD>
487</TR>
488
489<TR>
490<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
491&nbsp;<A HREF="../../../../org/apache/hadoop/fs/BlockLocation.html" title="class in org.apache.hadoop.fs"><B>PREV CLASS</B></A>&nbsp;
492&nbsp;<A HREF="../../../../org/apache/hadoop/fs/ChecksumException.html" title="class in org.apache.hadoop.fs"><B>NEXT CLASS</B></A></FONT></TD>
493<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
494  <A HREF="../../../../index.html?org/apache/hadoop/fs/BufferedFSInputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
495&nbsp;<A HREF="BufferedFSInputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
496&nbsp;<SCRIPT type="text/javascript">
497  <!--
498  if(window==top) {
499    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
500  }
501  //-->
502</SCRIPT>
503<NOSCRIPT>
504  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
505</NOSCRIPT>
506
507
508</FONT></TD>
509</TR>
510<TR>
511<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
512  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.io.BufferedInputStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
513<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
514DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
515</TR>
516</TABLE>
517<A NAME="skip-navbar_bottom"></A>
518<!-- ======== END OF BOTTOM NAVBAR ======= -->
519
520<HR>
521Copyright &copy; 2009 The Apache Software Foundation
522</BODY>
523</HTML>
Note: See TracBrowser for help on using the repository browser.