/** * Reads an {@link InputStream} and returns a {@String}. */ public static String toString(InputStream inputStream) throws IOException { return toString(inputStream, null); }
/** * Reads a {@link File} and returns a {@String}. */ public static String toString(File file) throws IOException { return toString(file, null); }
@Override public String readFrom(Class<String> stringClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> stringStringMultivaluedMap, InputStream inputStream) throws IOException, WebApplicationException { return Files.toString(inputStream); } }