~ubuntu-branches/ubuntu/oneiric/tomcat6/oneiric

« back to all changes in this revision

Viewing changes to java/org/apache/naming/resources/FileDirContext.java

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2010-07-20 14:36:48 UTC
  • mfrom: (2.2.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100720143648-23y81x6cq1kv1z00
Tags: 6.0.28-2
* Add debconf questions for user, group and Java options.
* Use ucf to install /etc/default/tomcat6 from a template
* Drop CATALINA_BASE and CATALINA_HOME from /etc/default/tomcat6 since we
  shouldn't encourage users to change those anyway

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 * Filesystem Directory Context implementation helper class.
47
47
 *
48
48
 * @author Remy Maucherat
49
 
 * @version $Revision: 769338 $ $Date: 2009-04-28 13:25:01 +0200 (Di, 28. Apr 2009) $
 
49
 * @version $Id: FileDirContext.java 939511 2010-04-29 23:48:20Z kkolinko $
50
50
 */
51
51
 
52
52
public class FileDirContext extends BaseDirContext {
884
884
 
885
885
 
886
886
    /**
887
 
     * This specialized resource implementation avoids opening the IputStream
 
887
     * This specialized resource implementation avoids opening the InputStream
888
888
     * to the file right away (which would put a lock on the file).
889
889
     */
890
890
    protected class FileResource extends Resource {
924
924
        public InputStream streamContent()
925
925
            throws IOException {
926
926
            if (binaryContent == null) {
927
 
                inputStream = new FileInputStream(file);
 
927
                FileInputStream fis = new FileInputStream(file);
 
928
                inputStream = fis;
 
929
                return fis;
928
930
            }
929
931
            return super.streamContent();
930
932
        }