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