Package tvbrowserdataservice.file

Examples of tvbrowserdataservice.file.DayProgramFile.readFromFile()


     
      if (file.exists()) {
        // Load this level
        DayProgramFile levelProg = new DayProgramFile();
        try {
          levelProg.readFromFile(file);
        }
        catch (Exception exc) {
          // This file must be corrupt -> delete it
          file.delete();
         
View Full Code Here


      // When we are here then the loading succeed -> The file is OK.
      // It is not a corrupt because it is currently being updated.
     
      // Load the complete file
      DayProgramFile completeProg = new DayProgramFile();
      completeProg.readFromFile(completeFile);
     
      // Update the complete file
      completeProg.updateCompleteFile(updateProg);

      // Save the complete program
View Full Code Here

      origProgFile.writeToFile(file);

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

      DayProgramFile readProgFile = new DayProgramFile();
      readProgFile.readFromFile(file);
    }
    finally {
      if (file != null) {
        file.delete();
      }
View Full Code Here

    if (! destDir.isDirectory()) {
      throw new IOException("File is not a directory: " + destDir.getAbsolutePath());
    }
   
    DayProgramFile prog = new DayProgramFile();
    prog.readFromFile(file);

    String progFileName = file.getName()//file.getAbsolutePath();
    // -8 for .prog.gz
    String transFileName = progFileName.substring(0, progFileName.length() - 8)
      + ".prog.txt";
View Full Code Here

        finished = true;
      } else {
        DayProgramFile updateFile;
        try {
          updateFile = new DayProgramFile();
          updateFile.readFromFile(file);
        }
        catch (Exception exc) {
          throw new PreparationException("Loading prepared file failed: "
            + filename, exc);
        }
View Full Code Here

        channel, level, version);
      File file = new File(preparedDir, updateFileName);
      DayProgramFile updateFile;
      try {
        updateFile = new DayProgramFile();
        updateFile.readFromFile(file);
      }
      catch (Exception exc) {
        throw new PreparationException("Loading update file for version "
          + version + " failed: " + file.getAbsolutePath(), exc);
      }
View Full Code Here

        if (date.compareTo(mDeadlineDay) >= 0) {
          // Load the file
          DayProgramFile rawFile;
          try {
            rawFile = new DayProgramFile();
            rawFile.readFromFile(element);
          }
          catch (Exception exc) {
            throw new PreparationException("Loading raw file failed: "
              + fileName, exc);
          }
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.