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