示例#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));
 }