public String getPostBody() { if (fileBytes.length == 0) { return FileUtils.enforceSystemLineSeparator(post); } final String utf8FileContent = StringUtils.newStringUtf8(fileBytes); return FileUtils.enforceSystemLineSeparator(utf8FileContent); }
private byte[] getFileBytes() { try { return FileUtils.fileToBytes(file); } catch (Exception e) { return new byte[] {}; } }
private List<StubHttpLifecycle> unmarshall(final String yaml) throws Exception { return new YamlParser().parse(".", FileUtils.constructReader(yaml)); }