[120] | 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> |
---|
| 7 | FSInputChecker (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"> |
---|
| 15 | function windowTitle() |
---|
| 16 | { |
---|
| 17 | if (location.href.indexOf('is-external=true') == -1) { |
---|
| 18 | parent.document.title="FSInputChecker (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> </TD> |
---|
| 41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FSInputChecker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
| 47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 | <A HREF="../../../../org/apache/hadoop/fs/FSError.html" title="class in org.apache.hadoop.fs"><B>PREV CLASS</B></A> |
---|
| 59 | <A HREF="../../../../org/apache/hadoop/fs/FSInputStream.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/FSInputChecker.html" target="_top"><B>FRAMES</B></A> |
---|
| 62 | <A HREF="FSInputChecker.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 63 | <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 81 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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"> |
---|
| 91 | org.apache.hadoop.fs</FONT> |
---|
| 92 | <BR> |
---|
| 93 | Class FSInputChecker</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="../../../../org/apache/hadoop/fs/FSInputStream.html" title="class in org.apache.hadoop.fs">org.apache.hadoop.fs.FSInputStream</A> |
---|
| 98 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.fs.FSInputChecker</B> |
---|
| 99 | </PRE> |
---|
| 100 | <DL> |
---|
| 101 | <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> |
---|
| 102 | </DL> |
---|
| 103 | <HR> |
---|
| 104 | <DL> |
---|
| 105 | <DT><PRE>public abstract class <B>FSInputChecker</B><DT>extends <A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html" title="class in org.apache.hadoop.fs">FSInputStream</A></DL> |
---|
| 106 | </PRE> |
---|
| 107 | |
---|
| 108 | <P> |
---|
| 109 | This is a generic input stream for verifying checksums for |
---|
| 110 | data before it is read by a user. |
---|
| 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 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 126 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 127 | <CODE>protected <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A></CODE></FONT></TD> |
---|
| 128 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#file">file</A></B></CODE> |
---|
| 129 | |
---|
| 130 | <BR> |
---|
| 131 | The file name from which data is read from</TD> |
---|
| 132 | </TR> |
---|
| 133 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 134 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 135 | <CODE>static org.apache.commons.logging.Log</CODE></FONT></TD> |
---|
| 136 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#LOG">LOG</A></B></CODE> |
---|
| 137 | |
---|
| 138 | <BR> |
---|
| 139 | </TD> |
---|
| 140 | </TR> |
---|
| 141 | </TABLE> |
---|
| 142 | |
---|
| 143 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
| 144 | |
---|
| 145 | <A NAME="constructor_summary"><!-- --></A> |
---|
| 146 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 147 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 148 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 149 | <B>Constructor Summary</B></FONT></TH> |
---|
| 150 | </TR> |
---|
| 151 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 152 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 153 | <CODE>protected </CODE></FONT></TD> |
---|
| 154 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#FSInputChecker(org.apache.hadoop.fs.Path, int)">FSInputChecker</A></B>(<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> file, |
---|
| 155 | int numOfRetries)</CODE> |
---|
| 156 | |
---|
| 157 | <BR> |
---|
| 158 | Constructor</TD> |
---|
| 159 | </TR> |
---|
| 160 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 161 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 162 | <CODE>protected </CODE></FONT></TD> |
---|
| 163 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#FSInputChecker(org.apache.hadoop.fs.Path, int, boolean, java.util.zip.Checksum, int, int)">FSInputChecker</A></B>(<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> file, |
---|
| 164 | int numOfRetries, |
---|
| 165 | boolean verifyChecksum, |
---|
| 166 | <A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A> sum, |
---|
| 167 | int chunkSize, |
---|
| 168 | int checksumSize)</CODE> |
---|
| 169 | |
---|
| 170 | <BR> |
---|
| 171 | Constructor</TD> |
---|
| 172 | </TR> |
---|
| 173 | </TABLE> |
---|
| 174 | |
---|
| 175 | <!-- ========== METHOD SUMMARY =========== --> |
---|
| 176 | |
---|
| 177 | <A NAME="method_summary"><!-- --></A> |
---|
| 178 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 179 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 180 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 181 | <B>Method Summary</B></FONT></TH> |
---|
| 182 | </TR> |
---|
| 183 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 184 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 185 | <CODE> int</CODE></FONT></TD> |
---|
| 186 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#available()">available</A></B>()</CODE> |
---|
| 187 | |
---|
| 188 | <BR> |
---|
| 189 | </TD> |
---|
| 190 | </TR> |
---|
| 191 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 192 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 193 | <CODE>static long</CODE></FONT></TD> |
---|
| 194 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#checksum2long(byte[])">checksum2long</A></B>(byte[] checksum)</CODE> |
---|
| 195 | |
---|
| 196 | <BR> |
---|
| 197 | Convert a checksum byte array to a long</TD> |
---|
| 198 | </TR> |
---|
| 199 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 200 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 201 | <CODE>protected abstract long</CODE></FONT></TD> |
---|
| 202 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#getChunkPosition(long)">getChunkPosition</A></B>(long pos)</CODE> |
---|
| 203 | |
---|
| 204 | <BR> |
---|
| 205 | Return position of beginning of chunk containing pos.</TD> |
---|
| 206 | </TR> |
---|
| 207 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 208 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 209 | <CODE> long</CODE></FONT></TD> |
---|
| 210 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#getPos()">getPos</A></B>()</CODE> |
---|
| 211 | |
---|
| 212 | <BR> |
---|
| 213 | Return the current offset from the start of the file</TD> |
---|
| 214 | </TR> |
---|
| 215 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 216 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 217 | <CODE> void</CODE></FONT></TD> |
---|
| 218 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#mark(int)">mark</A></B>(int readlimit)</CODE> |
---|
| 219 | |
---|
| 220 | <BR> |
---|
| 221 | </TD> |
---|
| 222 | </TR> |
---|
| 223 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 224 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 225 | <CODE> boolean</CODE></FONT></TD> |
---|
| 226 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#markSupported()">markSupported</A></B>()</CODE> |
---|
| 227 | |
---|
| 228 | <BR> |
---|
| 229 | </TD> |
---|
| 230 | </TR> |
---|
| 231 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 232 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 233 | <CODE>protected boolean</CODE></FONT></TD> |
---|
| 234 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#needChecksum()">needChecksum</A></B>()</CODE> |
---|
| 235 | |
---|
| 236 | <BR> |
---|
| 237 | Return true if there is a need for checksum verification</TD> |
---|
| 238 | </TR> |
---|
| 239 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 240 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 241 | <CODE> int</CODE></FONT></TD> |
---|
| 242 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#read()">read</A></B>()</CODE> |
---|
| 243 | |
---|
| 244 | <BR> |
---|
| 245 | Read one checksum-verified byte</TD> |
---|
| 246 | </TR> |
---|
| 247 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 248 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 249 | <CODE> int</CODE></FONT></TD> |
---|
| 250 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#read(byte[], int, int)">read</A></B>(byte[] b, |
---|
| 251 | int off, |
---|
| 252 | int len)</CODE> |
---|
| 253 | |
---|
| 254 | <BR> |
---|
| 255 | Read checksum verified bytes from this byte-input stream into |
---|
| 256 | the specified byte array, starting at the given offset.</TD> |
---|
| 257 | </TR> |
---|
| 258 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 259 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 260 | <CODE>protected abstract int</CODE></FONT></TD> |
---|
| 261 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#readChunk(long, byte[], int, int, byte[])">readChunk</A></B>(long pos, |
---|
| 262 | byte[] buf, |
---|
| 263 | int offset, |
---|
| 264 | int len, |
---|
| 265 | byte[] checksum)</CODE> |
---|
| 266 | |
---|
| 267 | <BR> |
---|
| 268 | Reads in next checksum chunk data into <code>buf</code> at <code>offset</code> |
---|
| 269 | and checksum into <code>checksum</code>.</TD> |
---|
| 270 | </TR> |
---|
| 271 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 272 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 273 | <CODE>protected static int</CODE></FONT></TD> |
---|
| 274 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#readFully(java.io.InputStream, byte[], int, int)">readFully</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> stm, |
---|
| 275 | byte[] buf, |
---|
| 276 | int offset, |
---|
| 277 | int len)</CODE> |
---|
| 278 | |
---|
| 279 | <BR> |
---|
| 280 | A utility function that tries to read up to <code>len</code> bytes from |
---|
| 281 | <code>stm</code></TD> |
---|
| 282 | </TR> |
---|
| 283 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 284 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 285 | <CODE> void</CODE></FONT></TD> |
---|
| 286 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#reset()">reset</A></B>()</CODE> |
---|
| 287 | |
---|
| 288 | <BR> |
---|
| 289 | </TD> |
---|
| 290 | </TR> |
---|
| 291 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 292 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 293 | <CODE> void</CODE></FONT></TD> |
---|
| 294 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#seek(long)">seek</A></B>(long pos)</CODE> |
---|
| 295 | |
---|
| 296 | <BR> |
---|
| 297 | Seek to the given position in the stream.</TD> |
---|
| 298 | </TR> |
---|
| 299 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 300 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 301 | <CODE>protected void</CODE></FONT></TD> |
---|
| 302 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#set(boolean, java.util.zip.Checksum, int, int)">set</A></B>(boolean verifyChecksum, |
---|
| 303 | <A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A> sum, |
---|
| 304 | int maxChunkSize, |
---|
| 305 | int checksumSize)</CODE> |
---|
| 306 | |
---|
| 307 | <BR> |
---|
| 308 | Set the checksum related parameters</TD> |
---|
| 309 | </TR> |
---|
| 310 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 311 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 312 | <CODE> long</CODE></FONT></TD> |
---|
| 313 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FSInputChecker.html#skip(long)">skip</A></B>(long n)</CODE> |
---|
| 314 | |
---|
| 315 | <BR> |
---|
| 316 | Skips over and discards <code>n</code> bytes of data from the |
---|
| 317 | input stream.</TD> |
---|
| 318 | </TR> |
---|
| 319 | </TABLE> |
---|
| 320 | <A NAME="methods_inherited_from_class_org.apache.hadoop.fs.FSInputStream"><!-- --></A> |
---|
| 321 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 322 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 323 | <TH ALIGN="left"><B>Methods inherited from class org.apache.hadoop.fs.<A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html" title="class in org.apache.hadoop.fs">FSInputStream</A></B></TH> |
---|
| 324 | </TR> |
---|
| 325 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 326 | <TD><CODE><A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html#read(long, byte[], int, int)">read</A>, <A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html#readFully(long, byte[])">readFully</A>, <A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html#readFully(long, byte[], int, int)">readFully</A>, <A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html#seekToNewSource(long)">seekToNewSource</A></CODE></TD> |
---|
| 327 | </TR> |
---|
| 328 | </TABLE> |
---|
| 329 | <A NAME="methods_inherited_from_class_java.io.InputStream"><!-- --></A> |
---|
| 330 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 331 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 332 | <TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></B></TH> |
---|
| 333 | </TR> |
---|
| 334 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 335 | <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.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/InputStream.html?is-external=true#read(byte[])" title="class or interface in java.io">read</A></CODE></TD> |
---|
| 336 | </TR> |
---|
| 337 | </TABLE> |
---|
| 338 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
| 339 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 340 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 341 | <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> |
---|
| 342 | </TR> |
---|
| 343 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 344 | <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> |
---|
| 345 | </TR> |
---|
| 346 | </TABLE> |
---|
| 347 | |
---|
| 348 | <P> |
---|
| 349 | |
---|
| 350 | <!-- ============ FIELD DETAIL =========== --> |
---|
| 351 | |
---|
| 352 | <A NAME="field_detail"><!-- --></A> |
---|
| 353 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 354 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 355 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 356 | <B>Field Detail</B></FONT></TH> |
---|
| 357 | </TR> |
---|
| 358 | </TABLE> |
---|
| 359 | |
---|
| 360 | <A NAME="LOG"><!-- --></A><H3> |
---|
| 361 | LOG</H3> |
---|
| 362 | <PRE> |
---|
| 363 | public static final org.apache.commons.logging.Log <B>LOG</B></PRE> |
---|
| 364 | <DL> |
---|
| 365 | <DL> |
---|
| 366 | </DL> |
---|
| 367 | </DL> |
---|
| 368 | <HR> |
---|
| 369 | |
---|
| 370 | <A NAME="file"><!-- --></A><H3> |
---|
| 371 | file</H3> |
---|
| 372 | <PRE> |
---|
| 373 | protected <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> <B>file</B></PRE> |
---|
| 374 | <DL> |
---|
| 375 | <DD>The file name from which data is read from |
---|
| 376 | <P> |
---|
| 377 | <DL> |
---|
| 378 | </DL> |
---|
| 379 | </DL> |
---|
| 380 | |
---|
| 381 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
| 382 | |
---|
| 383 | <A NAME="constructor_detail"><!-- --></A> |
---|
| 384 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 385 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 386 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 387 | <B>Constructor Detail</B></FONT></TH> |
---|
| 388 | </TR> |
---|
| 389 | </TABLE> |
---|
| 390 | |
---|
| 391 | <A NAME="FSInputChecker(org.apache.hadoop.fs.Path, int)"><!-- --></A><H3> |
---|
| 392 | FSInputChecker</H3> |
---|
| 393 | <PRE> |
---|
| 394 | protected <B>FSInputChecker</B>(<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> file, |
---|
| 395 | int numOfRetries)</PRE> |
---|
| 396 | <DL> |
---|
| 397 | <DD>Constructor |
---|
| 398 | <P> |
---|
| 399 | <DL> |
---|
| 400 | <DT><B>Parameters:</B><DD><CODE>file</CODE> - The name of the file to be read<DD><CODE>numOfRetries</CODE> - Number of read retries when ChecksumError occurs</DL> |
---|
| 401 | </DL> |
---|
| 402 | <HR> |
---|
| 403 | |
---|
| 404 | <A NAME="FSInputChecker(org.apache.hadoop.fs.Path, int, boolean, java.util.zip.Checksum, int, int)"><!-- --></A><H3> |
---|
| 405 | FSInputChecker</H3> |
---|
| 406 | <PRE> |
---|
| 407 | protected <B>FSInputChecker</B>(<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> file, |
---|
| 408 | int numOfRetries, |
---|
| 409 | boolean verifyChecksum, |
---|
| 410 | <A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A> sum, |
---|
| 411 | int chunkSize, |
---|
| 412 | int checksumSize)</PRE> |
---|
| 413 | <DL> |
---|
| 414 | <DD>Constructor |
---|
| 415 | <P> |
---|
| 416 | <DL> |
---|
| 417 | <DT><B>Parameters:</B><DD><CODE>file</CODE> - The name of the file to be read<DD><CODE>numOfRetries</CODE> - Number of read retries when ChecksumError occurs<DD><CODE>sum</CODE> - the type of Checksum engine<DD><CODE>chunkSize</CODE> - maximun chunk size<DD><CODE>checksumSize</CODE> - the number byte of each checksum</DL> |
---|
| 418 | </DL> |
---|
| 419 | |
---|
| 420 | <!-- ============ METHOD DETAIL ========== --> |
---|
| 421 | |
---|
| 422 | <A NAME="method_detail"><!-- --></A> |
---|
| 423 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 424 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 425 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 426 | <B>Method Detail</B></FONT></TH> |
---|
| 427 | </TR> |
---|
| 428 | </TABLE> |
---|
| 429 | |
---|
| 430 | <A NAME="readChunk(long, byte[], int, int, byte[])"><!-- --></A><H3> |
---|
| 431 | readChunk</H3> |
---|
| 432 | <PRE> |
---|
| 433 | protected abstract int <B>readChunk</B>(long pos, |
---|
| 434 | byte[] buf, |
---|
| 435 | int offset, |
---|
| 436 | int len, |
---|
| 437 | byte[] checksum) |
---|
| 438 | 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> |
---|
| 439 | <DL> |
---|
| 440 | <DD>Reads in next checksum chunk data into <code>buf</code> at <code>offset</code> |
---|
| 441 | and checksum into <code>checksum</code>. |
---|
| 442 | The method is used for implementing read, therefore, it should be optimized |
---|
| 443 | for sequential reading |
---|
| 444 | <P> |
---|
| 445 | <DD><DL> |
---|
| 446 | <DT><B>Parameters:</B><DD><CODE>pos</CODE> - chunkPos<DD><CODE>buf</CODE> - desitination buffer<DD><CODE>offset</CODE> - offset in buf at which to store data<DD><CODE>len</CODE> - maximun number of bytes to read |
---|
| 447 | <DT><B>Returns:</B><DD>number of bytes read |
---|
| 448 | <DT><B>Throws:</B> |
---|
| 449 | <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> |
---|
| 450 | </DD> |
---|
| 451 | </DL> |
---|
| 452 | <HR> |
---|
| 453 | |
---|
| 454 | <A NAME="getChunkPosition(long)"><!-- --></A><H3> |
---|
| 455 | getChunkPosition</H3> |
---|
| 456 | <PRE> |
---|
| 457 | protected abstract long <B>getChunkPosition</B>(long pos)</PRE> |
---|
| 458 | <DL> |
---|
| 459 | <DD>Return position of beginning of chunk containing pos. |
---|
| 460 | <P> |
---|
| 461 | <DD><DL> |
---|
| 462 | <DT><B>Parameters:</B><DD><CODE>pos</CODE> - a postion in the file |
---|
| 463 | <DT><B>Returns:</B><DD>the starting position of the chunk which contains the byte</DL> |
---|
| 464 | </DD> |
---|
| 465 | </DL> |
---|
| 466 | <HR> |
---|
| 467 | |
---|
| 468 | <A NAME="needChecksum()"><!-- --></A><H3> |
---|
| 469 | needChecksum</H3> |
---|
| 470 | <PRE> |
---|
| 471 | protected boolean <B>needChecksum</B>()</PRE> |
---|
| 472 | <DL> |
---|
| 473 | <DD>Return true if there is a need for checksum verification |
---|
| 474 | <P> |
---|
| 475 | <DD><DL> |
---|
| 476 | </DL> |
---|
| 477 | </DD> |
---|
| 478 | </DL> |
---|
| 479 | <HR> |
---|
| 480 | |
---|
| 481 | <A NAME="read()"><!-- --></A><H3> |
---|
| 482 | read</H3> |
---|
| 483 | <PRE> |
---|
| 484 | public int <B>read</B>() |
---|
| 485 | 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> |
---|
| 486 | <DL> |
---|
| 487 | <DD>Read one checksum-verified byte |
---|
| 488 | <P> |
---|
| 489 | <DD><DL> |
---|
| 490 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read()" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> |
---|
| 491 | </DD> |
---|
| 492 | <DD><DL> |
---|
| 493 | |
---|
| 494 | <DT><B>Returns:</B><DD>the next byte of data, or <code>-1</code> if the end of the |
---|
| 495 | stream is reached. |
---|
| 496 | <DT><B>Throws:</B> |
---|
| 497 | <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> - if an I/O error occurs.</DL> |
---|
| 498 | </DD> |
---|
| 499 | </DL> |
---|
| 500 | <HR> |
---|
| 501 | |
---|
| 502 | <A NAME="read(byte[], int, int)"><!-- --></A><H3> |
---|
| 503 | read</H3> |
---|
| 504 | <PRE> |
---|
| 505 | public int <B>read</B>(byte[] b, |
---|
| 506 | int off, |
---|
| 507 | int len) |
---|
| 508 | 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> |
---|
| 509 | <DL> |
---|
| 510 | <DD>Read checksum verified bytes from this byte-input stream into |
---|
| 511 | the specified byte array, starting at the given offset. |
---|
| 512 | |
---|
| 513 | <p> This method implements the general contract of the corresponding |
---|
| 514 | <code><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read(byte[], int, int)" title="class or interface in java.io"><CODE>read</CODE></A></code> method of |
---|
| 515 | the <code><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><CODE>InputStream</CODE></A></code> class. As an additional |
---|
| 516 | convenience, it attempts to read as many bytes as possible by repeatedly |
---|
| 517 | invoking the <code>read</code> method of the underlying stream. This |
---|
| 518 | iterated <code>read</code> continues until one of the following |
---|
| 519 | conditions becomes true: <ul> |
---|
| 520 | |
---|
| 521 | <li> The specified number of bytes have been read, |
---|
| 522 | |
---|
| 523 | <li> The <code>read</code> method of the underlying stream returns |
---|
| 524 | <code>-1</code>, indicating end-of-file. |
---|
| 525 | |
---|
| 526 | </ul> If the first <code>read</code> on the underlying stream returns |
---|
| 527 | <code>-1</code> to indicate end-of-file then this method returns |
---|
| 528 | <code>-1</code>. Otherwise this method returns the number of bytes |
---|
| 529 | actually read. |
---|
| 530 | <P> |
---|
| 531 | <DD><DL> |
---|
| 532 | <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read(byte[], int, int)" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> |
---|
| 533 | </DD> |
---|
| 534 | <DD><DL> |
---|
| 535 | <DT><B>Parameters:</B><DD><CODE>b</CODE> - destination buffer.<DD><CODE>off</CODE> - offset at which to start storing bytes.<DD><CODE>len</CODE> - maximum number of bytes to read. |
---|
| 536 | <DT><B>Returns:</B><DD>the number of bytes read, or <code>-1</code> if the end of |
---|
| 537 | the stream has been reached. |
---|
| 538 | <DT><B>Throws:</B> |
---|
| 539 | <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> - if an I/O error occurs. |
---|
| 540 | ChecksumException if any checksum error occurs</DL> |
---|
| 541 | </DD> |
---|
| 542 | </DL> |
---|
| 543 | <HR> |
---|
| 544 | |
---|
| 545 | <A NAME="checksum2long(byte[])"><!-- --></A><H3> |
---|
| 546 | checksum2long</H3> |
---|
| 547 | <PRE> |
---|
| 548 | public static long <B>checksum2long</B>(byte[] checksum)</PRE> |
---|
| 549 | <DL> |
---|
| 550 | <DD>Convert a checksum byte array to a long |
---|
| 551 | <P> |
---|
| 552 | <DD><DL> |
---|
| 553 | </DL> |
---|
| 554 | </DD> |
---|
| 555 | </DL> |
---|
| 556 | <HR> |
---|
| 557 | |
---|
| 558 | <A NAME="getPos()"><!-- --></A><H3> |
---|
| 559 | getPos</H3> |
---|
| 560 | <PRE> |
---|
| 561 | public long <B>getPos</B>() |
---|
| 562 | 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> |
---|
| 563 | <DL> |
---|
| 564 | <DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html#getPos()">FSInputStream</A></CODE></B></DD> |
---|
| 565 | <DD>Return the current offset from the start of the file |
---|
| 566 | <P> |
---|
| 567 | <DD><DL> |
---|
| 568 | <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><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html#getPos()">getPos</A></CODE> in class <CODE><A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html" title="class in org.apache.hadoop.fs">FSInputStream</A></CODE></DL> |
---|
| 569 | </DD> |
---|
| 570 | <DD><DL> |
---|
| 571 | |
---|
| 572 | <DT><B>Throws:</B> |
---|
| 573 | <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> |
---|
| 574 | </DD> |
---|
| 575 | </DL> |
---|
| 576 | <HR> |
---|
| 577 | |
---|
| 578 | <A NAME="available()"><!-- --></A><H3> |
---|
| 579 | available</H3> |
---|
| 580 | <PRE> |
---|
| 581 | public int <B>available</B>() |
---|
| 582 | 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> |
---|
| 583 | <DL> |
---|
| 584 | <DD><DL> |
---|
| 585 | <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#available()" title="class or interface in java.io">available</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> |
---|
| 586 | </DD> |
---|
| 587 | <DD><DL> |
---|
| 588 | |
---|
| 589 | <DT><B>Throws:</B> |
---|
| 590 | <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> |
---|
| 591 | </DD> |
---|
| 592 | </DL> |
---|
| 593 | <HR> |
---|
| 594 | |
---|
| 595 | <A NAME="skip(long)"><!-- --></A><H3> |
---|
| 596 | skip</H3> |
---|
| 597 | <PRE> |
---|
| 598 | public long <B>skip</B>(long n) |
---|
| 599 | 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> |
---|
| 600 | <DL> |
---|
| 601 | <DD>Skips over and discards <code>n</code> bytes of data from the |
---|
| 602 | input stream. |
---|
| 603 | |
---|
| 604 | <p>This method may skip more bytes than are remaining in the backing |
---|
| 605 | file. This produces no exception and the number of bytes skipped |
---|
| 606 | may include some number of bytes that were beyond the EOF of the |
---|
| 607 | backing file. Attempting to read from the stream after skipping past |
---|
| 608 | the end will result in -1 indicating the end of the file. |
---|
| 609 | |
---|
| 610 | <p>If <code>n</code> is negative, no bytes are skipped. |
---|
| 611 | <P> |
---|
| 612 | <DD><DL> |
---|
| 613 | <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.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/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> |
---|
| 614 | </DD> |
---|
| 615 | <DD><DL> |
---|
| 616 | <DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of bytes to be skipped. |
---|
| 617 | <DT><B>Returns:</B><DD>the actual number of bytes skipped. |
---|
| 618 | <DT><B>Throws:</B> |
---|
| 619 | <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> - if an I/O error occurs. |
---|
| 620 | ChecksumException if the chunk to skip to is corrupted</DL> |
---|
| 621 | </DD> |
---|
| 622 | </DL> |
---|
| 623 | <HR> |
---|
| 624 | |
---|
| 625 | <A NAME="seek(long)"><!-- --></A><H3> |
---|
| 626 | seek</H3> |
---|
| 627 | <PRE> |
---|
| 628 | public void <B>seek</B>(long pos) |
---|
| 629 | 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> |
---|
| 630 | <DL> |
---|
| 631 | <DD>Seek to the given position in the stream. |
---|
| 632 | The next read() will be from that position. |
---|
| 633 | |
---|
| 634 | <p>This method may seek past the end of the file. |
---|
| 635 | This produces no exception and an attempt to read from |
---|
| 636 | the stream will result in -1 indicating the end of the file. |
---|
| 637 | <P> |
---|
| 638 | <DD><DL> |
---|
| 639 | <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><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html#seek(long)">seek</A></CODE> in class <CODE><A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html" title="class in org.apache.hadoop.fs">FSInputStream</A></CODE></DL> |
---|
| 640 | </DD> |
---|
| 641 | <DD><DL> |
---|
| 642 | <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the postion to seek to. |
---|
| 643 | <DT><B>Throws:</B> |
---|
| 644 | <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> - if an I/O error occurs. |
---|
| 645 | ChecksumException if the chunk to seek to is corrupted</DL> |
---|
| 646 | </DD> |
---|
| 647 | </DL> |
---|
| 648 | <HR> |
---|
| 649 | |
---|
| 650 | <A NAME="readFully(java.io.InputStream, byte[], int, int)"><!-- --></A><H3> |
---|
| 651 | readFully</H3> |
---|
| 652 | <PRE> |
---|
| 653 | protected static int <B>readFully</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> stm, |
---|
| 654 | byte[] buf, |
---|
| 655 | int offset, |
---|
| 656 | int len) |
---|
| 657 | 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> |
---|
| 658 | <DL> |
---|
| 659 | <DD>A utility function that tries to read up to <code>len</code> bytes from |
---|
| 660 | <code>stm</code> |
---|
| 661 | <P> |
---|
| 662 | <DD><DL> |
---|
| 663 | <DT><B>Parameters:</B><DD><CODE>stm</CODE> - an input stream<DD><CODE>buf</CODE> - destiniation buffer<DD><CODE>offset</CODE> - offset at which to store data<DD><CODE>len</CODE> - number of bytes to read |
---|
| 664 | <DT><B>Returns:</B><DD>actual number of bytes read |
---|
| 665 | <DT><B>Throws:</B> |
---|
| 666 | <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> - if there is any IO error</DL> |
---|
| 667 | </DD> |
---|
| 668 | </DL> |
---|
| 669 | <HR> |
---|
| 670 | |
---|
| 671 | <A NAME="set(boolean, java.util.zip.Checksum, int, int)"><!-- --></A><H3> |
---|
| 672 | set</H3> |
---|
| 673 | <PRE> |
---|
| 674 | protected final void <B>set</B>(boolean verifyChecksum, |
---|
| 675 | <A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A> sum, |
---|
| 676 | int maxChunkSize, |
---|
| 677 | int checksumSize)</PRE> |
---|
| 678 | <DL> |
---|
| 679 | <DD>Set the checksum related parameters |
---|
| 680 | <P> |
---|
| 681 | <DD><DL> |
---|
| 682 | <DT><B>Parameters:</B><DD><CODE>verifyChecksum</CODE> - whether to verify checksum<DD><CODE>sum</CODE> - which type of checksum to use<DD><CODE>maxChunkSize</CODE> - maximun chunk size<DD><CODE>checksumSize</CODE> - checksum size</DL> |
---|
| 683 | </DD> |
---|
| 684 | </DL> |
---|
| 685 | <HR> |
---|
| 686 | |
---|
| 687 | <A NAME="markSupported()"><!-- --></A><H3> |
---|
| 688 | markSupported</H3> |
---|
| 689 | <PRE> |
---|
| 690 | public final boolean <B>markSupported</B>()</PRE> |
---|
| 691 | <DL> |
---|
| 692 | <DD><DL> |
---|
| 693 | <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#markSupported()" title="class or interface in java.io">markSupported</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> |
---|
| 694 | </DD> |
---|
| 695 | <DD><DL> |
---|
| 696 | </DL> |
---|
| 697 | </DD> |
---|
| 698 | </DL> |
---|
| 699 | <HR> |
---|
| 700 | |
---|
| 701 | <A NAME="mark(int)"><!-- --></A><H3> |
---|
| 702 | mark</H3> |
---|
| 703 | <PRE> |
---|
| 704 | public final void <B>mark</B>(int readlimit)</PRE> |
---|
| 705 | <DL> |
---|
| 706 | <DD><DL> |
---|
| 707 | <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#mark(int)" title="class or interface in java.io">mark</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> |
---|
| 708 | </DD> |
---|
| 709 | <DD><DL> |
---|
| 710 | </DL> |
---|
| 711 | </DD> |
---|
| 712 | </DL> |
---|
| 713 | <HR> |
---|
| 714 | |
---|
| 715 | <A NAME="reset()"><!-- --></A><H3> |
---|
| 716 | reset</H3> |
---|
| 717 | <PRE> |
---|
| 718 | public final void <B>reset</B>() |
---|
| 719 | 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> |
---|
| 720 | <DL> |
---|
| 721 | <DD><DL> |
---|
| 722 | <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#reset()" title="class or interface in java.io">reset</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> |
---|
| 723 | </DD> |
---|
| 724 | <DD><DL> |
---|
| 725 | |
---|
| 726 | <DT><B>Throws:</B> |
---|
| 727 | <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> |
---|
| 728 | </DD> |
---|
| 729 | </DL> |
---|
| 730 | <!-- ========= END OF CLASS DATA ========= --> |
---|
| 731 | <HR> |
---|
| 732 | |
---|
| 733 | |
---|
| 734 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
| 735 | <A NAME="navbar_bottom"><!-- --></A> |
---|
| 736 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
| 737 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
| 738 | <TR> |
---|
| 739 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
| 740 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
| 741 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
| 742 | <TR ALIGN="center" VALIGN="top"> |
---|
| 743 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
| 744 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 745 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 746 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FSInputChecker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 747 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 748 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 749 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
| 750 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
| 751 | </TR> |
---|
| 752 | </TABLE> |
---|
| 753 | </TD> |
---|
| 754 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
| 755 | </EM> |
---|
| 756 | </TD> |
---|
| 757 | </TR> |
---|
| 758 | |
---|
| 759 | <TR> |
---|
| 760 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 761 | <A HREF="../../../../org/apache/hadoop/fs/FSError.html" title="class in org.apache.hadoop.fs"><B>PREV CLASS</B></A> |
---|
| 762 | <A HREF="../../../../org/apache/hadoop/fs/FSInputStream.html" title="class in org.apache.hadoop.fs"><B>NEXT CLASS</B></A></FONT></TD> |
---|
| 763 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 764 | <A HREF="../../../../index.html?org/apache/hadoop/fs/FSInputChecker.html" target="_top"><B>FRAMES</B></A> |
---|
| 765 | <A HREF="FSInputChecker.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 766 | <SCRIPT type="text/javascript"> |
---|
| 767 | <!-- |
---|
| 768 | if(window==top) { |
---|
| 769 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
| 770 | } |
---|
| 771 | //--> |
---|
| 772 | </SCRIPT> |
---|
| 773 | <NOSCRIPT> |
---|
| 774 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
| 775 | </NOSCRIPT> |
---|
| 776 | |
---|
| 777 | |
---|
| 778 | </FONT></TD> |
---|
| 779 | </TR> |
---|
| 780 | <TR> |
---|
| 781 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 782 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 783 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 784 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
| 785 | </TR> |
---|
| 786 | </TABLE> |
---|
| 787 | <A NAME="skip-navbar_bottom"></A> |
---|
| 788 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
| 789 | |
---|
| 790 | <HR> |
---|
| 791 | Copyright © 2009 The Apache Software Foundation |
---|
| 792 | </BODY> |
---|
| 793 | </HTML> |
---|