mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-19 19:49:35 +00:00
- Fixed some non-static expansion methods - Fixed scripts not reloading properly - Implemented mod support build system - Fixed recipe removal breaking on recipes without predefined output - Fixed NPE on parsing a bracket expression that doesn't exist - now prints an appropriate error
28 lines
681 B
Java
28 lines
681 B
Java
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
package minetweaker.util;
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
|
|
/**
|
|
*
|
|
* @author Stan
|
|
*/
|
|
public class FileUtil {
|
|
public static final byte[] read(InputStream input) throws IOException {
|
|
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
|
byte[] buffer = new byte[65536];
|
|
while (input.available() > 0) {
|
|
int bytesRead = input.read(buffer);
|
|
output.write(buffer, 0, bytesRead);
|
|
}
|
|
return output.toByteArray();
|
|
}
|
|
}
|