/lib/commons-io/apidocs/org/apache/commons/io/filefilter/CanReadFileFilter.html
HTML | 397 lines | 329 code | 44 blank | 24 comment | 0 complexity | 1596aca33f9285a9a7ea006ec07afa72 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, Apache-2.0
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc (build 1.6.0_20) on Tue Sep 28 21:40:06 EDT 2010 -->
- <TITLE>
- CanReadFileFilter (Commons IO 1.5-SNAPSHOT)
- </TITLE>
- <META NAME="date" CONTENT="2010-09-28">
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
- <SCRIPT type="text/javascript">
- function windowTitle()
- {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="CanReadFileFilter (Commons IO 1.5-SNAPSHOT)";
- }
- }
- </SCRIPT>
- <NOSCRIPT>
- </NOSCRIPT>
- </HEAD>
- <BODY BGCOLOR="white" onload="windowTitle();">
- <HR>
- <!-- ========= START OF TOP NAVBAR ======= -->
- <A NAME="navbar_top"><!-- --></A>
- <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../../org/apache/commons/io/filefilter/AndFileFilter.html" title="class in org.apache.commons.io.filefilter"><B>PREV CLASS</B></A>
- <A HREF="../../../../../org/apache/commons/io/filefilter/CanWriteFileFilter.html" title="class in org.apache.commons.io.filefilter"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../../index.html?org/apache/commons/io/filefilter/CanReadFileFilter.html" target="_top"><B>FRAMES</B></A>
- <A HREF="CanReadFileFilter.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_top"></A>
- <!-- ========= END OF TOP NAVBAR ========= -->
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- org.apache.commons.io.filefilter</FONT>
- <BR>
- Class CanReadFileFilter</H2>
- <PRE>
- <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
- <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html" title="class in org.apache.commons.io.filefilter">org.apache.commons.io.filefilter.AbstractFileFilter</A>
- <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.io.filefilter.CanReadFileFilter</B>
- </PRE>
- <DL>
- <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.html?is-external=true" title="class or interface in java.io">FileFilter</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilenameFilter.html?is-external=true" title="class or interface in java.io">FilenameFilter</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</A></DD>
- </DL>
- <HR>
- <DL>
- <DT><PRE>public class <B>CanReadFileFilter</B><DT>extends <A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html" title="class in org.apache.commons.io.filefilter">AbstractFileFilter</A><DT>implements <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
- </PRE>
- <P>
- This filter accepts <code>File</code>s that can be read.
- <p>
- Example, showing how to print out a list of the
- current directory's <i>readable</i> files:
- <pre>
- File dir = new File(".");
- String[] files = dir.list( CanReadFileFilter.CAN_READ );
- for ( int i = 0; i < files.length; i++ ) {
- System.out.println(files[i]);
- }
- </pre>
- <p>
- Example, showing how to print out a list of the
- current directory's <i>un-readable</i> files:
- <pre>
- File dir = new File(".");
- String[] files = dir.list( CanReadFileFilter.CANNOT_READ );
- for ( int i = 0; i < files.length; i++ ) {
- System.out.println(files[i]);
- }
- </pre>
- <p>
- Example, showing how to print out a list of the
- current directory's <i>read-only</i> files:
- <pre>
- File dir = new File(".");
- String[] files = dir.list( CanReadFileFilter.READ_ONLY );
- for ( int i = 0; i < files.length; i++ ) {
- System.out.println(files[i]);
- }
- </pre>
- <P>
- <P>
- <DL>
- <DT><B>Since:</B></DT>
- <DD>Commons IO 1.3</DD>
- <DT><B>Version:</B></DT>
- <DD>$Revision: 659817 $</DD>
- <DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.commons.io.filefilter.CanReadFileFilter">Serialized Form</A></DL>
- <HR>
- <P>
- <!-- =========== FIELD SUMMARY =========== -->
- <A NAME="field_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Field Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static <A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/CanReadFileFilter.html#CAN_READ">CAN_READ</A></B></CODE>
- <BR>
- Singleton instance of <i>readable</i> filter</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static <A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/CanReadFileFilter.html#CANNOT_READ">CANNOT_READ</A></B></CODE>
- <BR>
- Singleton instance of not <i>readable</i> filter</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static <A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/CanReadFileFilter.html#READ_ONLY">READ_ONLY</A></B></CODE>
- <BR>
- Singleton instance of <i>read-only</i> filter</TD>
- </TR>
- </TABLE>
-
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <A NAME="constructor_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Constructor Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>protected </CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/CanReadFileFilter.html#CanReadFileFilter()">CanReadFileFilter</A></B>()</CODE>
- <BR>
- Restrictive consructor.</TD>
- </TR>
- </TABLE>
-
- <!-- ========== METHOD SUMMARY =========== -->
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Method Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/CanReadFileFilter.html#accept(java.io.File)">accept</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A> file)</CODE>
- <BR>
- Checks to see if the file can be read.</TD>
- </TR>
- </TABLE>
- <A NAME="methods_inherited_from_class_org.apache.commons.io.filefilter.AbstractFileFilter"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
- <TH ALIGN="left"><B>Methods inherited from class org.apache.commons.io.filefilter.<A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html" title="class in org.apache.commons.io.filefilter">AbstractFileFilter</A></B></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html#accept(java.io.File, java.lang.String)">accept</A>, <A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html#toString()">toString</A></CODE></TD>
- </TR>
- </TABLE>
- <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
- <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
- </TR>
- </TABLE>
-
- <P>
- <!-- ============ FIELD DETAIL =========== -->
- <A NAME="field_detail"><!-- --></A>