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: stringEntityProvider
test_class.modifier: private
test_class.original_string: private StringEntityProvider stringEntityProvider;
test_class.type: StringEntityProvider
test_class.var_name: stringEntityProvider
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/provider/StringEntityProviderTest.java
test_class.identifier: StringEntityProviderTest
test_case.body: @Test
      public void writesStringToOutputStream() throws Exception {
          MediaType mediaType = new MediaType("text", "plain", ImmutableMap.of("charset", "windows-1251"));
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          stringEntityProvider.writeTo(TEST_CONTENT, String.class, null, null, mediaType, new MultivaluedHashMap<>(), out);
  
          assertArrayEquals(TEST_CONTENT.getBytes("windows-1251"), out.toByteArray());
      }
test_case.class_method_signature: StringEntityProviderTest.writesStringToOutputStream()
test_case.full_signature: @Test public void writesStringToOutputStream()
test_case.identifier: writesStringToOutputStream
test_case.invocations: of writeTo assertArrayEquals getBytes toByteArray
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void writesStringToOutputStream()
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/provider/StringEntityProvider.java
focal_class.identifier: StringEntityProvider
focal_class.interfaces: implements EntityProvider<String>
focal_class.class_method_signature: StringEntityProvider.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: StringEntityProvider.readFrom(Class<String> type,
                             Type genericType,
                             Annotation[] annotations,
                             MediaType mediaType,
                             MultivaluedMap<String, String> httpHeaders,
                             InputStream entityStream)
focal_class.full_signature: @Override public String readFrom(Class<String> 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<String> type,
                             Type genericType,
                             Annotation[] annotations,
                             MediaType mediaType,
                             MultivaluedMap<String, String> httpHeaders,
                             InputStream entityStream)
focal_class.return: String
focal_class.signature: String readFrom(Class<String> type,
                             Type genericType,
                             Annotation[] annotations,
                             MediaType mediaType,
                             MultivaluedMap<String, String> httpHeaders,
                             InputStream entityStream)
focal_class.class_method_signature: StringEntityProvider.getSize(String string, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.full_signature: @Override public long getSize(String string, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.identifier: getSize
focal_class.modifiers: @Override public
focal_class.parameters: (String string, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.return: long
focal_class.signature: long getSize(String string, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.class_method_signature: StringEntityProvider.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: StringEntityProvider.writeTo(String string,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_class.full_signature: @Override public void writeTo(String string,
                          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: (String string,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_class.return: void
focal_class.signature: void writeTo(String string,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_class.class_method_signature: StringEntityProvider.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(String string,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream) throws IOException {
          Writer writer = new OutputStreamWriter(entityStream, getCharsetOrUtf8(mediaType));
          writer.write(string);
          writer.flush();
      }
focal_method.class_method_signature: StringEntityProvider.writeTo(String string,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_method.full_signature: @Override public void writeTo(String string,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_method.identifier: writeTo
focal_method.invocations: getCharsetOrUtf8 write flush
focal_method.modifiers: @Override public
focal_method.parameters: (String string,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_method.return: void
focal_method.signature: void writeTo(String string,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)