test_class.declarator: TEST_CONTENT = "\u041f\u0440\u0438\u0432\u0456\u0442"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_CONTENT = "\u041f\u0440\u0438\u0432\u0456\u0442";
test_class.type: String
test_class.var_name: TEST_CONTENT
test_class.declarator: readerEntityProvider
test_class.modifier: private
test_class.original_string: private ReaderEntityProvider readerEntityProvider;
test_class.type: ReaderEntityProvider
test_class.var_name: readerEntityProvider
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/provider/ReaderEntityProviderTest.java
test_class.identifier: ReaderEntityProviderTest
test_case.body: @Test
      public void writesUtf8ReaderToOutputStream() throws Exception {
          MediaType mediaType = new MediaType("text", "plain");
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          readerEntityProvider.writeTo(new StringReader(TEST_CONTENT), String.class, null, null, mediaType, new MultivaluedHashMap<>(), out);
  
          assertArrayEquals(TEST_CONTENT.getBytes("UTF-8"), out.toByteArray());
      }
test_case.class_method_signature: ReaderEntityProviderTest.writesUtf8ReaderToOutputStream()
test_case.full_signature: @Test public void writesUtf8ReaderToOutputStream()
test_case.identifier: writesUtf8ReaderToOutputStream
test_case.invocations: writeTo assertArrayEquals getBytes toByteArray
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void writesUtf8ReaderToOutputStream()
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/provider/ReaderEntityProvider.java
focal_class.identifier: ReaderEntityProvider
focal_class.interfaces: implements EntityProvider<Reader>
focal_class.class_method_signature: ReaderEntityProvider.isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.full_signature: @Override public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.identifier: isReadable
focal_class.modifiers: @Override public
focal_class.parameters: (Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.return: boolean
focal_class.signature: boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.class_method_signature: ReaderEntityProvider.readFrom(Class<Reader> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                             MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_class.full_signature: @Override public Reader readFrom(Class<Reader> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                             MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_class.identifier: readFrom
focal_class.modifiers: @Override public
focal_class.parameters: (Class<Reader> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                             MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_class.return: Reader
focal_class.signature: Reader readFrom(Class<Reader> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                             MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_class.class_method_signature: ReaderEntityProvider.getSize(Reader t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.full_signature: @Override public long getSize(Reader t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.identifier: getSize
focal_class.modifiers: @Override public
focal_class.parameters: (Reader t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.return: long
focal_class.signature: long getSize(Reader t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.class_method_signature: ReaderEntityProvider.isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.full_signature: @Override public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.identifier: isWriteable
focal_class.modifiers: @Override public
focal_class.parameters: (Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.return: boolean
focal_class.signature: boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.class_method_signature: ReaderEntityProvider.writeTo(Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
focal_class.full_signature: @Override public void writeTo(Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
focal_class.identifier: writeTo
focal_class.modifiers: @Override public
focal_class.parameters: (Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
focal_class.return: void
focal_class.signature: void writeTo(Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
focal_class.class_method_signature: ReaderEntityProvider.getCharsetOrUtf8(MediaType mediaType)
focal_class.full_signature: private String getCharsetOrUtf8(MediaType mediaType)
focal_class.identifier: getCharsetOrUtf8
focal_class.modifiers: private
focal_class.parameters: (MediaType mediaType)
focal_class.return: String
focal_class.signature: String getCharsetOrUtf8(MediaType mediaType)
focal_method.body: @Override
      public void writeTo(Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException {
          Writer out = new OutputStreamWriter(entityStream, getCharsetOrUtf8(mediaType));
          try {
              CharStreams.copy(reader, out);
          } finally {
              out.flush();
              reader.close();
          }
      }
focal_method.class_method_signature: ReaderEntityProvider.writeTo(Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
focal_method.full_signature: @Override public void writeTo(Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
focal_method.identifier: writeTo
focal_method.invocations: getCharsetOrUtf8 copy flush close
focal_method.modifiers: @Override public
focal_method.parameters: (Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
focal_method.return: void
focal_method.signature: void writeTo(Reader reader, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)