Coverage Report - org.jaudiotagger.logging.ErrorMessage
 
Classes in this File Line Coverage Branch Coverage Complexity
ErrorMessage
100%
71/71
N/A
0
 
 1  
 package org.jaudiotagger.logging;
 2  
 
 3  
 import java.text.MessageFormat;
 4  
 
 5  
 /**
 6  
  * Defines Error Messages
 7  
  */
 8  26
 public enum ErrorMessage
 9  
 {
 10  26
     MP4_FILE_NOT_CONTAINER("This file does not appear to be an Mp4  file"),
 11  26
     MP4_FILE_NOT_AUDIO("This file does not appear to be an Mp4 Audio file, could be corrupted or video "),
 12  26
     MP4_FILE_IS_VIDEO("This file appears to be an Mp4 Video file, video files are not supported "),
 13  26
     MP4_UNABLE_TO_PRIME_FILE_FOR_WRITE_SAFETLY("Unable to safetly check consistency in Mp4 file so cancelling save"),
 14  26
     MP4_FILE_CONTAINS_MULTIPLE_DATA_ATOMS("File contains multiple data atoms"),
 15  26
     MP4_CHANGES_TO_FILE_FAILED("Unable to make changes to Mp4 file"),
 16  26
     MP4_CHANGES_TO_FILE_FAILED_NO_DATA("Unable to make changes to Mp4 file, no data was written"),
 17  26
     MP4_CHANGES_TO_FILE_FAILED_DATA_CORRUPT("Unable to make changes to Mp4 file, invalid data length has been written"),
 18  26
     MP4_CHANGES_TO_FILE_FAILED_NO_TAG_DATA("Unable to make changes to Mp4 file, no tag data has been written"),
 19  26
     MP4_CHANGES_TO_FILE_FAILED_INCORRECT_OFFSETS("Unable to make changes to Mp4 file, incorrect offsets written difference was {0}"),
 20  26
     FLAC_NO_FLAC_HEADER_FOUND("Flac Header not found, not a flac file"),
 21  26
     OGG_VORBIS_NO_VORBIS_HEADER_FOUND("Cannot find vorbis setup parentHeader"),
 22  26
     MP4_REVERSE_DNS_FIELD_HAS_NO_DATA("Reverse dns field:{0} has no data"),
 23  26
     MP4_UNABLE_READ_REVERSE_DNS_FIELD("Unable to create reverse dns field because of exception:{0} adding as binary data instead"),
 24  26
     OGG_VORBIS_NO_FRAMING_BIT("The OGG Stream is not valid, Vorbis tag valid framing bit is wrong {0} "),
 25  26
     GENERAL_WRITE_FAILED("Cannot make changes to file {0}"),
 26  26
     GENERAL_WRITE_FAILED_FILE_LOCKED("Cannot make changes to file {0} because it is being used by another application"),
 27  26
     GENERAL_WRITE_FAILED_BECAUSE_FILE_IS_TOO_SMALL("Cannot make changes to file {0} because too small to be an audio file"),
 28  26
     GENERAL_WRITE_FAILED_TO_DELETE_ORIGINAL_FILE("Cannot make changes to file {0} because unable to delete the original file ready for updating from temporary file {1}"),
 29  26
     GENERAL_WRITE_FAILED_TO_RENAME_TO_ORIGINAL_FILE("Cannot make changes to file {0} because unable to rename from temporary file {1}"),
 30  26
     GENERAL_WRITE_FAILED_TO_RENAME_ORIGINAL_FILE_TO_BACKUP("Cannot make changes to file {0} because unable to rename the original file to {1}"),
 31  26
     GENERAL_WRITE_FAILED_TO_RENAME_ORIGINAL_BACKUP_TO_ORIGINAL("Unable to rename backup {0} back to file {1}"),
 32  26
     GENERAL_WRITE_FAILED_NEW_FILE_DOESNT_EXIST("New file {0} does not appear to exist"),
 33  26
     GENERAL_WRITE_FAILED_BECAUSE("Cannot make changes to file {0} because {1}"),
 34  26
     GENERAL_WRITE_FAILED_BECAUSE_FILE_NOT_FOUND("Cannot make changes to file {0} because the file cannot be found"),
 35  26
     GENERAL_WRITE_WARNING_UNABLE_TO_DELETE_BACKUP_FILE("Unable to delete the backup file {0}"),        
 36  26
     GENERAL_WRITE_PROBLEM_CLOSING_FILE_HANDLE("Problem closing file handles for file {0} because {1}"),
 37  26
     GENERAL_DELETE_FAILED("Cannot delete file {0}"),
 38  26
     GENERAL_DELETE_FAILED_FILE_LOCKED("Cannot delete file {0} because it is being used by another application"),
 39  26
     GENERAL_DELETE_FAILED_BECAUSE_FILE_IS_TOO_SMALL("Cannot write to file {0} because too small to be an audio file"),
 40  26
     MP3_ID3TAG_LENGTH_INCORRECT(" {0}:Checking further because the ID3 Tag ends at {1} but the mp3 audio doesnt start until {2}"),
 41  26
     MP3_RECALCULATED_POSSIBLE_START_OF_MP3_AUDIO("{0}: Recalculated possible start of the audio to be at {1}"),
 42  26
     MP3_RECALCULATED_START_OF_MP3_AUDIO("{0}: Recalculated the start of the audio to be at {1}"),
 43  26
     MP3_START_OF_AUDIO_CONFIRMED("{0}: Confirmed audio starts at {1} whether searching from start or from end of ID3 tag"),
 44  26
     MP3_URL_SAVED_ENCODED("Url:{0} saved in encoded form as {1}"),
 45  26
     MP3_UNABLE_TO_ENCODE_URL("Unable to save url:{0} because cannot encode all characters setting to blank instead"),
 46  26
     MP4_UNABLE_TO_FIND_NEXT_ATOM_BECAUSE_IDENTIFIER_IS_INVALID("Unable to find next atom because identifier is invalid {0}"),
 47  26
     MP4_UNABLE_TO_FIND_NEXT_ATOM_BECAUSE_LENGTH_IS_INVALID("Unable to find next atom {0} because length is invalid {1}"),
 48  26
     GENERAL_INVALID_NULL_ARGUMENT("Argument cannot be null"),
 49  26
     MP4_GENRE_OUT_OF_RANGE("Genre Id {0} does not map to a valid genre"),
 50  26
     MP3_PICTURE_TYPE_INVALID("Picture Type is set to invalid value:{0}"),
 51  26
     MP3_REFERENCE_KEY_INVALID("{0}:No key could be found with the value of:{1}"),
 52  26
     MP3_UNABLE_TO_ADJUST_PADDING("Problem adjusting padding in large file, expecting to write:{0} only wrote:{1}"),
 53  26
     GENERAL_WRITE_FAILED_TO_DELETE_TEMPORARY_FILE("Unable to delete the temporary file {0}"),
 54  26
     GENERAL_WRITE_FAILED_TO_CREATE_TEMPORARY_FILE_IN_FOLDER("Cannot modify {0} because do not have permissions to create files in the folder {1}"),
 55  26
     GENERAL_WRITE_FAILED_TO_MODIFY_TEMPORARY_FILE_IN_FOLDER("Cannot modify {0} because do not have permissions to modify files in the folder {1}"),
 56  26
     GENERAL_WRITE_FAILED_TO_OPEN_FILE_FOR_EDITING("Cannot modify {0} because do not have permissions to modify file"),
 57  26
     NULL_PADDING_FOUND_AT_END_OF_MP4("Null Padding found at end of file starting at offset {0}"),
 58  26
     OGG_VORBIS_NO_SETUP_BLOCK("Could not find the Ogg Setup block"),
 59  26
     OGG_HEADER_CANNOT_BE_FOUND("OggS Header could not be found, not an ogg stream {0}"),
 60  26
     GENERAL_READ_FAILED_UNABLE_TO_CLOSE_RANDOM_ACCESS_FILE("Unable to close random access file: {0}"),
 61  26
     GENERAL_READ_FAILED_FILE_TOO_SMALL("Unable to read file because it is too small to be valid audio file: {0}"),
 62  26
     GENERAL_READ_FAILED_DO_NOT_HAVE_PERMISSION_TO_READ_FILE("Unable to read file do not have permission to read: {0}"),
 63  26
     ASF_FILE_HEADER_SIZE_DOES_NOT_MATCH_FILE_SIZE("For file {0} the File header size is {1} but different to actual file size of {2}"),
 64  26
     ASF_FILE_HEADER_MISSING("For file {0} the File Header missing. Invalid ASF/WMA file."),
 65  26
     ASF_HEADER_MISSING("For file {0} the Asf Header missing. Invalid ASF/WMA file."),
 66  26
     GENERAL_UNIDENITIFED_IMAGE_FORMAT("Cannot safetly identify the format of this image setting to default type of Png"),
 67  26
     MP4_IMAGE_FORMAT_IS_NOT_TO_EXPECTED_TYPE("ImageFormat for cover art atom is not set to a known image format, instead set to {0}"),
 68  26
     MP3_FRAME_IS_COMPRESSED("Filename {0}:{1} is compressed"),
 69  26
     MP3_FRAME_IS_ENCRYPTED("Filename {0}:{1} is encrypted"),
 70  26
     MP3_FRAME_IS_GROUPED("Filename {0}:{1} is grouped"),
 71  26
     MP3_FRAME_IS_UNSYNCHRONISED("Filename {0}:{1} is unsynchronised"),
 72  26
     MP3_FRAME_IS_DATA_LENGTH_INDICATOR("Filename {0}:{1} has a data length indicator"),
 73  26
     MP4_FILE_HAS_NO_METADATA("This file does not currently contain any metadata"),
 74  26
     MP4_FILE_META_ATOM_CHILD_DATA_NOT_NULL("Expect data in meta box to be null"),
 75  
     ;
 76  
 
 77  
 
 78  
     String msg;
 79  
 
 80  
     ErrorMessage(String msg)
 81  1690
     {
 82  1690
         this.msg = msg;
 83  1690
     }
 84  
 
 85  
     public String getMsg()
 86  
     {
 87  100
         return msg;
 88  
     }
 89  
 
 90  
     public String getMsg(Object... args)
 91  
     {
 92  79
         return MessageFormat.format(getMsg(), args);
 93  
     }
 94  
 
 95  
 }