Package util.io

Examples of util.io.FileFormatException


      file.delete();
      throw exc;
    }
    catch (FileFormatException exc) {
      file.delete();
      throw new FileFormatException("Writing file failed "
        + file.getAbsolutePath(), exc);
    }
  }
View Full Code Here



  private void checkFormat() throws FileFormatException {
    // Check whether the ID was set
    if (mId == -1) {
      throw new FileFormatException("The program frame's ID was not set");
    }
   
    // Check whether there are duplicate fields
    for (int i = 0; i < getProgramFieldCount(); i++) {
      ProgramField field = getProgramFieldAt(i);
      // Check whether there is a field that has the same type ID than this one
      for (int j = i + 1; j < getProgramFieldCount(); j++) {
        ProgramField cmp = getProgramFieldAt(j);
       
        if (field.getTypeId() == cmp.getTypeId()) {
          throw new FileFormatException("Program field #" + i + " and "
            + "program field #" + j + " have the same type: "
            + ProgramFieldType.getTypeForId(field.getTypeId()).getName());
        }
      }
    }
View Full Code Here

TOP

Related Classes of util.io.FileFormatException

Copyright © 2018 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.