Examples of writeToFile()


Examples of tvbrowserdataservice.file.DayProgramFile.writeToFile()

     
      // Update the complete file
      completeProg.updateCompleteFile(updateProg);

      // Save the complete program
      completeProg.writeToFile(completeFile);
     
      // Tell the database updater that this file needs an update
      mUpdater.addUpdateJobForDayProgramFile(completeFileName);
    }
    catch (Exception exc) {
View Full Code Here

Examples of tvbrowserdataservice.file.DayProgramFile.writeToFile()

    File file = null;
    try {
      file = File.createTempFile("tvbrowser", ".test.prog.gz");

      DayProgramFile origProgFile = createTestDayProgramFile();
      origProgFile.writeToFile(file);

      // System.out.println("Test file saved: " + file.getAbsolutePath());

      DayProgramFile readProgFile = new DayProgramFile();
      readProgFile.readFromFile(file);
View Full Code Here

Examples of tvbrowserdataservice.file.DayProgramFile.writeToFile()

    DayProgramFile prepProg1 = new DayProgramFile();
    prepProg1.setVersion(1);
    prepProg1.addProgramFrame(createProgramFrame(1, 20, 30, "Otto 1"));
    prepProg1.addProgramFrame(createProgramFrame(2, 31, 50, "Karlson vom Dach"));
    prepProg1.addProgramFrame(createProgramFrame(3, 51, 80, "Nixfürungut"));
    prepProg1.writeToFile(new File(prepDir, "2010-01-01_de_test_base_full.prog.gz"));

    DayProgramFile prepProg3 = new DayProgramFile();
    prepProg3.setVersion(1);
    prepProg3.addProgramFrame(createProgramFrame(1, 10, 20, "Vorher"));
    ProgramFrame frame = createProgramFrame(2, 21, 50, "Lange Sendung");
View Full Code Here

Examples of tvbrowserdataservice.file.DayProgramFile.writeToFile()

    prepProg3.addProgramFrame(createProgramFrame(1, 10, 20, "Vorher"));
    ProgramFrame frame = createProgramFrame(2, 21, 50, "Lange Sendung");
    frame.addProgramField(ProgramField.create(ProgramFieldType.DESCRIPTION_TYPE, "Bla bla"));
    prepProg3.addProgramFrame(frame);
    prepProg3.addProgramFrame(createProgramFrame(3, 51, 60, "Danach"));
    prepProg3.writeToFile(new File(prepDir, "2010-01-03_de_test_base_full.prog.gz"));

    // Start the update
    //manager.setGroupNames(new String[]{"testgroup"});
    //manager.updateRawDataDir();
    // TODO: Check the result
View Full Code Here

Examples of tvbrowserdataservice.file.DayProgramFile.writeToFile()

        // An unchanged day program except for the program order
        DayProgramFile rawProg1 = new DayProgramFile();
        rawProg1.addProgramFrame(createProgramFrame(10, 51, 80, "Nixfürungut"));
        rawProg1.addProgramFrame(createProgramFrame(11, 20, 30, "Otto 1"));
        rawProg1.addProgramFrame(createProgramFrame(12, 31, 50, "Karlson vom Dach"));
        rawProg1.writeToFile(new File(targetDir, "2010-01-01_de_test_raw_full.gz"));

        // A new day program
        DayProgramFile rawProg2 = new DayProgramFile();
        rawProg2.addProgramFrame(createProgramFrame(10, 50, 70, "Nachrichten"));
        rawProg2.writeToFile(new File(targetDir, "2010-01-02_de_test_raw_full.gz"));
View Full Code Here

Examples of tvbrowserdataservice.file.DayProgramFile.writeToFile()

        rawProg1.writeToFile(new File(targetDir, "2010-01-01_de_test_raw_full.gz"));

        // A new day program
        DayProgramFile rawProg2 = new DayProgramFile();
        rawProg2.addProgramFrame(createProgramFrame(10, 50, 70, "Nachrichten"));
        rawProg2.writeToFile(new File(targetDir, "2010-01-02_de_test_raw_full.gz"));

        // A day program that needs an update
        DayProgramFile rawProg3 = new DayProgramFile();
        rawProg3.addProgramFrame(createProgramFrame(12, 21, 30, "Kurze Sendung I"));
        rawProg3.addProgramFrame(createProgramFrame(10, 10, 20, "Vorher"));
View Full Code Here

Examples of tvbrowserdataservice.file.DayProgramFile.writeToFile()

        DayProgramFile rawProg3 = new DayProgramFile();
        rawProg3.addProgramFrame(createProgramFrame(12, 21, 30, "Kurze Sendung I"));
        rawProg3.addProgramFrame(createProgramFrame(10, 10, 20, "Vorher"));
        rawProg3.addProgramFrame(createProgramFrame(11, 51, 60, "Danach"));
        rawProg3.addProgramFrame(createProgramFrame(13, 31, 50, "Kurze Sendung II"));
        rawProg3.writeToFile(new File(targetDir, "2010-01-03_de_test_raw_full.gz"));

        // TODO: A day program that has an old update with a higher frame version
        //       that needs a second update

        return false;
View Full Code Here

Examples of tvbrowserdataservice.file.SummaryFile.writeToFile()

      System.out.println("writing summary to file...");

      // Save the file
      File file = new File(mWorkDir, mGroupNameArr[i]+"_"+SummaryFile.SUMMARY_FILE_NAME);
      try {
        summary.writeToFile(file);
      }
      catch (Exception exc) {
        throw new PreparationException("Writing summary file failed: "
          + file.getAbsolutePath(), exc);
      }
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.io.ResourceGetter.writeToFile()

  public static void deployInChI() throws Exception {
    ResourceGetter rg = new ResourceGetter("uk/ac/cam/ch/wwmm/oscar3/deployment/resources/");
    File inchiFile = null;
    if(System.getProperty("os.name").equals("Linux")) {
      inchiFile = new File("cInChI-1");
      rg.writeToFile("cInChI-1.bin", inchiFile);
      Runtime.getRuntime().exec("chmod a+x " + inchiFile.getAbsolutePath());
    } else if(System.getProperty("os.name").startsWith("Windows")) {
      inchiFile = new File("cInChI-1.exe");
      rg.writeToFile("cInChI-1.exe", inchiFile);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.