import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.FileInputStream;
+import java.io.InputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
*
* @throws IOException
*/
- private void readBinaryFile(String file) throws IOException
+ public void readBinaryFile(String file, InputStream data) throws IOException
{
- FileInputStream data; // For reading the file
ByteBuffer dataBuffer; // For reading in the correct endian
byte[] Info=new byte[80]; // Header data
byte[] Array_number= new byte[4]; // Holds the number of faces
}
else
{ // It's a local file
- data = new FileInputStream(file);
// First 80 bytes aren't important
if(80 != data.read(Info))
else
{ // Binary file
try{
- readBinaryFile(getFileName());
+ readBinaryFile(getFileName(), new FileInputStream(getFileName()));
}
catch(IOException e)
{