mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-22 07:59:19 +01:00
Added getChunkFromContent function to "NUSDataProvider" class for getting chunks of a content file
This commit is contained in:
parent
8d6c6b8691
commit
a0ce50a4b5
@ -26,6 +26,7 @@ import de.mas.wiiu.jnus.Settings;
|
||||
import de.mas.wiiu.jnus.entities.content.Content;
|
||||
import de.mas.wiiu.jnus.utils.FileUtils;
|
||||
import de.mas.wiiu.jnus.utils.HashUtil;
|
||||
import de.mas.wiiu.jnus.utils.StreamUtils;
|
||||
import de.mas.wiiu.jnus.utils.Utils;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
@ -153,6 +154,10 @@ public abstract class NUSDataProvider {
|
||||
|
||||
}
|
||||
|
||||
public byte[] getChunkFromContent(Content content, long offset, int size) throws IOException {
|
||||
return StreamUtils.getBytesFromStream(getInputStreamFromContent(content, offset), size);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param content
|
||||
|
Loading…
Reference in New Issue
Block a user