Use the default readFile implementation for the FSTDataProviderNUSTitle

This commit is contained in:
Maschell 2019-04-26 10:08:53 +02:00
parent ddee4b9f5d
commit c57cee987a

View File

@ -16,7 +16,6 @@
****************************************************************************/ ****************************************************************************/
package de.mas.wiiu.jnus.implementations; package de.mas.wiiu.jnus.implementations;
import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
@ -65,15 +64,6 @@ public class FSTDataProviderNUSTitle implements FSTDataProvider, HasNUSTitle {
return rootEntry; return rootEntry;
} }
@Override
public byte[] readFile(FSTEntry entry, long offset, long size) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
readFileToStream(out, entry, offset, Optional.of(size));
return out.toByteArray();
}
@Override @Override
public boolean readFileToStream(OutputStream out, FSTEntry entry, long offset, Optional<Long> size) throws IOException { public boolean readFileToStream(OutputStream out, FSTEntry entry, long offset, Optional<Long> size) throws IOException {
long fileOffset = entry.getFileOffset() + offset; long fileOffset = entry.getFileOffset() + offset;