Behandeln eines null in Resource.load()
parent
b5d9b6eed2
commit
eeadb035f9
|
@ -31,6 +31,9 @@ public class Ressource {
|
|||
}
|
||||
|
||||
public static byte[] load(InputStream in) throws IOException{
|
||||
if (in == null){
|
||||
return null;
|
||||
}
|
||||
byte[] buffer = new byte[in.available()];
|
||||
in.read(buffer);
|
||||
return buffer;
|
||||
|
|
Loading…
Reference in New Issue