src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/RecordingInput.java
branchJEP-349-branch
changeset 57717 4ce66d271065
parent 57690 9316d02dd4a5
child 58197 0ef79bd7fb5c
equal deleted inserted replaced
57702:c75c241c492a 57717:4ce66d271065
    79         this.fileAccess = fileAccess;
    79         this.fileAccess = fileAccess;
    80         initialize(f);
    80         initialize(f);
    81     }
    81     }
    82 
    82 
    83     private void initialize(File f) throws IOException {
    83     private void initialize(File f) throws IOException {
    84         this.filename = f.getAbsolutePath().toString();
    84         this.filename = fileAccess.getAbsolutePath(f);
    85         this.file = fileAccess.openRAF(f, "r");
    85         this.file = fileAccess.openRAF(f, "r");
    86         this.position = 0;
    86         this.position = 0;
    87         this.size = -1;
    87         this.size = -1;
    88         this.currentBlock.reset();
    88         this.currentBlock.reset();
    89         this.previousBlock.reset();
    89         previousBlock.reset();
    90         if (f.length() < 8) {
    90         if (fileAccess.length(f) < 8) {
    91             throw new IOException("Not a valid Flight Recorder file. File length is only " + f.length() + " bytes.");
    91             throw new IOException("Not a valid Flight Recorder file. File length is only " + f.length() + " bytes.");
    92         }
    92         }
    93     }
    93     }
    94 
    94 
    95     public RecordingInput(File f, FileAccess fileAccess) throws IOException {
    95     public RecordingInput(File f, FileAccess fileAccess) throws IOException {