(File in)
| 29 | |
| 30 | public class Util { |
| 31 | public static byte[] readFile(File in) throws IOException { |
| 32 | InputStream is = new FileInputStream(in); |
| 33 | byte[] xml = new byte[is.available()]; |
| 34 | is.read(xml); |
| 35 | is.close(); |
| 36 | return xml; |
| 37 | } |
| 38 | |
| 39 | public static byte[] readIs(InputStream is) throws IOException { |
| 40 | ByteArrayOutputStream os = new ByteArrayOutputStream(); |