Search in sources :

Example 1 with ObjectPathsAbsolutifier

use of com.facebook.buck.macho.ObjectPathsAbsolutifier in project buck by facebook.

the class MachOAbsolutifyObjectPathsCommand method invokeWithParams.

@Override
protected int invokeWithParams(CommandRunnerParams params) throws IOException {
    try (RandomAccessFile file = new RandomAccessFile(getOutput().toFile(), "rw")) {
        NulTerminatedCharsetDecoder decoder = new NulTerminatedCharsetDecoder(StandardCharsets.UTF_8.newDecoder());
        ObjectPathsAbsolutifier updater = new ObjectPathsAbsolutifier(file, getOldCompDir(), getUpdatedCompDir(), params.getCell().getFilesystem(), params.getCell().getKnownRoots(), decoder);
        updater.updatePaths();
    }
    return 0;
}
Also used : RandomAccessFile(java.io.RandomAccessFile) ObjectPathsAbsolutifier(com.facebook.buck.macho.ObjectPathsAbsolutifier) NulTerminatedCharsetDecoder(com.facebook.buck.charset.NulTerminatedCharsetDecoder)

Aggregations

NulTerminatedCharsetDecoder (com.facebook.buck.charset.NulTerminatedCharsetDecoder)1 ObjectPathsAbsolutifier (com.facebook.buck.macho.ObjectPathsAbsolutifier)1 RandomAccessFile (java.io.RandomAccessFile)1