public static Attachment fromTextInputStream( InputStream inputStream, MediaType mediaType ) throws IOException {
        return fromText( CharStreams.toString( new InputStreamReader( inputStream, mediaType.getCharset() ) ), mediaType );
    }
Creates a non-binary attachment from the given file.
@throws IOException if an I/O error occurs
@throws java.lang.IllegalArgumentException if mediaType is either binary or has no specified charset
jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java