Package java.io

Examples of java.io.FileInputStream


      entry = this.archiveEntry() ;
      return this.container().getInputStream( entry ) ;
    }
    else
    {
      return new FileInputStream( this.getFile() ) ;
    }
  } // getInputStream()
View Full Code Here


        // if properties file exists on its own then override any properties file
        // potentially held within a jar

        if ( properties_file.exists()){

          FileInputStream  fis = null;

          try{
            fis = new FileInputStream( properties_file );

            props.load( fis );

          }finally{

            if ( fis != null ){

              fis.close();
            }
          }

        }else{
View Full Code Here

          String name = args[index++];
          System.out.print(name + ";");
          if (name.startsWith("http://")) {
            in = new URL(name).openConnection().getInputStream();
          } else {
            in = new FileInputStream(name);
          }
          run(name, in, imageInfo, verbose);
          in.close();
        } catch (Exception e) {
          System.out.println(e);
View Full Code Here

      Instances trainHeader = null;

      m_Log.statusMessage("Loading model from file...");

      try {
  InputStream is = new FileInputStream(selected);
  if (selected.getName().endsWith(PMML_FILE_EXTENSION)) {
    PMMLModel model = PMMLFactory.getPMMLModel(is, m_Log);
    if (model instanceof PMMLClassifier) {
      classifier = (PMMLClassifier)model;
      /*trainHeader =
View Full Code Here

        StopWatch sw = new StopWatch("testPutDocument");
        DbCollection xmark = DbCollection.getRootCollection().createCollection(COL_NAME);
        assert (xmark.getDirectory().exists());
        final DocumentTableModel dtm = new DocumentTableModel(false);
        File file = new File(TEST_FILE);
        dtm.loadDocument(new FileInputStream(file));
        IDocumentTable doc = dtm.getDocumentTable();
        //DbCollection coll = new DbCollection(true);
        xmark.putDocument(new Transaction(), file.getName(), doc);
        System.err.println(sw);
    }
View Full Code Here

        DbCollection xmark = DbCollection.getRootCollection().createCollection(COL_NAME);
        assert (xmark.getDirectory().exists());
        File file = new File(TEST_FILE);
        IDocumentTable doc = new DocumentTable.PersistentDocumentTable(xmark, FileUtils.getFileName(file));
        final DocumentTableModel dtm = new DocumentTableModel(doc);
        dtm.loadDocument(new FileInputStream(file));
        xmark.putDocument(new Transaction(), file.getName(), doc);
    }
View Full Code Here

        DbCollection xmark = DbCollection.getRootCollection().createCollection(COL_NAME);
        assert (xmark.getDirectory().exists());
        File file = new File(TEST_FILE);
        IDocumentTable doc = new BigDocumentTable();
        final DocumentTableModel dtm = new DocumentTableModel(doc);
        dtm.loadDocument(new FileInputStream(file));
        xmark.putDocument(new Transaction(), file.getName(), doc);
    }
View Full Code Here

        DbCollection xmark = DbCollection.getRootCollection().createCollection(COL_NAME);
        assert (xmark.getDirectory().exists());
        File file = new File(TEST_FILE);
        IDocumentTable doc = new BigDocumentTable.PersistentBigDocumentTable(xmark, FileUtils.getFileName(file));
        final DocumentTableModel dtm = new DocumentTableModel(doc);
        dtm.loadDocument(new FileInputStream(file));
        xmark.putDocument(new Transaction(), file.getName(), doc);
        System.err.println(sw);
    }
View Full Code Here

      try{
        AEVerifier.verifyData( temp );
     
        ok  = true;
       
        return( new FileInputStream( temp ));

      }catch( AEVerifierException e ){
               
        if ( (!force) && e.getFailureType() == AEVerifierException.FT_SIGNATURE_MISSING ){
         
          for (int i=0;i<verification_listeners.size();i++){
           
            try{
              queried  = true;
             
              if ( ((UpdateManagerVerificationListener)verification_listeners.get(i)).acceptUnVerifiedUpdate(
                  update )){
               
                ok  = true;
               
                return( new FileInputStream( temp ));
              }
            }catch( Throwable f ){
             
              Debug.printStackTrace(f);
            }
View Full Code Here

        fos = null;
       
          // System.out.println( "wrote cache file " + temp_file + " for " + this );
       
        scratch_file_name  = temp_file;
        scratch_file_is   = new FileInputStream( temp_file );
       
        messages_dirty    = false;
       
      }catch( Throwable e ){
       
View Full Code Here

TOP

Related Classes of java.io.FileInputStream

Copyright © 2015 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.