static public byte[] readbinaryfile(File f) throws IOException { try (FileInputStream fis = new FileInputStream(f)) { return readbinaryfile(fis); } }
protected TestCase(String filename, boolean overwrite, String target) { super(null); this.filename = HTTPUtil.canonicalpath(filename); this.status = ""; this.overwrite = overwrite; this.target = HTTPUtil.canonicalpath(HTTPUtil.nullify(target)); try { this.file = HTTPUtil.readbinaryfile(new File(filename)); } catch (IOException ioe) { throw new IllegalArgumentException(ioe); } }
byte[] tmp = HTTPUtil.readbinaryfile((InputStream) field.value); body = new ByteArrayBody(tmp, field.name); } catch (IOException ioe) {