test_class.declarator: TEST_XML_CONTENT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                                                     + "<book send-by-post=\"true\">"
                                                     + "  <title>Java and XML Data Binding</title>"
                                                     + "  <author>Brett McLaughlin</author>"
                                                     + "  <price currency=\"USD\">34.95</price>"
                                                     + "  <member-price currency=\"USD\">26.56</member-price>"
                                                     + "</book>"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_XML_CONTENT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                                                     + "<book send-by-post=\"true\">"
                                                     + "  <title>Java and XML Data Binding</title>"
                                                     + "  <author>Brett McLaughlin</author>"
                                                     + "  <price currency=\"USD\">34.95</price>"
                                                     + "  <member-price currency=\"USD\">26.56</member-price>"
                                                     + "</book>";
test_class.type: String
test_class.var_name: TEST_XML_CONTENT
test_class.declarator: TEST_XML_CONTENT_BYTES = TEST_XML_CONTENT.getBytes()
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_XML_CONTENT_BYTES = TEST_XML_CONTENT.getBytes();
test_class.type: byte[]
test_class.var_name: TEST_XML_CONTENT_BYTES
test_class.declarator: reader
test_class.modifier: private
test_class.original_string: private MessageBodyReader   reader;
test_class.type: MessageBodyReader
test_class.var_name: reader
test_class.declarator: writer
test_class.modifier: private
test_class.original_string: private MessageBodyWriter   writer;
test_class.type: MessageBodyWriter
test_class.var_name: writer
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/provider/JAXBElementEntityProviderTest.java
test_class.identifier: JAXBElementEntityProviderTest
test_case.body: @Test
      public void writesJAXBElementToOutputStream() throws Exception {
          Class<?> type = JAXBElement.class;
          Type genericType = newParameterizedType(JAXBElement.class, Book.class);
          JAXBElement<Book> bookJAXBElement = unmarshalJAXBElement(TEST_XML_CONTENT_BYTES);
          ByteArrayOutputStream out = new ByteArrayOutputStream();
  
          writer.writeTo(bookJAXBElement, type, genericType, null, APPLICATION_XML_TYPE, null, out);
  
          JAXBElement<Book> writtenBookJAXBElement = unmarshalJAXBElement(out.toByteArray());
          Book book = writtenBookJAXBElement.getValue();
          assertEquals("Java and XML Data Binding", book.getTitle());
          assertTrue(book.isSendByPost());
          assertEquals("Brett McLaughlin", book.getAuthor());
          assertEquals("USD", book.getPrice().getCurrency());
          assertEquals(new BigDecimal("34.95"), book.getPrice().getValue());
          assertEquals("USD", book.getMemberPrice().getCurrency());
          assertEquals(new BigDecimal("26.56"), book.getMemberPrice().getValue());
      }
test_case.class_method_signature: JAXBElementEntityProviderTest.writesJAXBElementToOutputStream()
test_case.full_signature: @Test public void writesJAXBElementToOutputStream()
test_case.identifier: writesJAXBElementToOutputStream
test_case.invocations: newParameterizedType unmarshalJAXBElement writeTo unmarshalJAXBElement toByteArray getValue assertEquals getTitle assertTrue isSendByPost assertEquals getAuthor assertEquals getCurrency getPrice assertEquals getValue getPrice assertEquals getCurrency getMemberPrice assertEquals getValue getMemberPrice
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void writesJAXBElementToOutputStream()
focal_class.declarator: LOG = LoggerFactory.getLogger(JAXBElementEntityProvider.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(JAXBElementEntityProvider.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: providers
focal_class.modifier: private
focal_class.original_string: private Providers providers;
focal_class.type: Providers
focal_class.var_name: providers
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/provider/JAXBElementEntityProvider.java
focal_class.identifier: JAXBElementEntityProvider
focal_class.interfaces: implements EntityProvider<JAXBElement<?>>
focal_class.class_method_signature: JAXBElementEntityProvider.JAXBElementEntityProvider(@Context Providers providers)
focal_class.full_signature: public  JAXBElementEntityProvider(@Context Providers providers)
focal_class.identifier: JAXBElementEntityProvider
focal_class.modifiers: public
focal_class.parameters: (@Context Providers providers)
focal_class.signature:  JAXBElementEntityProvider(@Context Providers providers)
focal_class.class_method_signature: JAXBElementEntityProvider.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: JAXBElementEntityProvider.readFrom(Class<JAXBElement<?>> type,
                                     Type genericType,
                                     Annotation[] annotations,
                                     MediaType mediaType,
                                     MultivaluedMap<String, String> httpHeaders,
                                     InputStream entityStream)
focal_class.full_signature: @Override public JAXBElement<?> readFrom(Class<JAXBElement<?>> 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<JAXBElement<?>> type,
                                     Type genericType,
                                     Annotation[] annotations,
                                     MediaType mediaType,
                                     MultivaluedMap<String, String> httpHeaders,
                                     InputStream entityStream)
focal_class.return: JAXBElement<?>
focal_class.signature: JAXBElement<?> readFrom(Class<JAXBElement<?>> type,
                                     Type genericType,
                                     Annotation[] annotations,
                                     MediaType mediaType,
                                     MultivaluedMap<String, String> httpHeaders,
                                     InputStream entityStream)
focal_class.class_method_signature: JAXBElementEntityProvider.getSize(JAXBElement<?> t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.full_signature: @Override public long getSize(JAXBElement<?> t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.identifier: getSize
focal_class.modifiers: @Override public
focal_class.parameters: (JAXBElement<?> t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.return: long
focal_class.signature: long getSize(JAXBElement<?> t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.class_method_signature: JAXBElementEntityProvider.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: JAXBElementEntityProvider.writeTo(JAXBElement<?> t,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_class.full_signature: @Override public void writeTo(JAXBElement<?> t,
                          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: (JAXBElement<?> t,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_class.return: void
focal_class.signature: void writeTo(JAXBElement<?> t,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_class.class_method_signature: JAXBElementEntityProvider.getCharset(MediaType mediaType)
focal_class.full_signature: private String getCharset(MediaType mediaType)
focal_class.identifier: getCharset
focal_class.modifiers: private
focal_class.parameters: (MediaType mediaType)
focal_class.return: String
focal_class.signature: String getCharset(MediaType mediaType)
focal_class.class_method_signature: JAXBElementEntityProvider.getJAXBContext(Class<?> type, MediaType mediaType)
focal_class.full_signature: protected JAXBContext getJAXBContext(Class<?> type, MediaType mediaType)
focal_class.identifier: getJAXBContext
focal_class.modifiers: protected
focal_class.parameters: (Class<?> type, MediaType mediaType)
focal_class.return: JAXBContext
focal_class.signature: JAXBContext getJAXBContext(Class<?> type, MediaType mediaType)
focal_method.body: @Override
      public void writeTo(JAXBElement<?> t,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream) throws IOException {
          Class<?> declaredType = t.getDeclaredType();
          try {
              JAXBContext jaxbContext = getJAXBContext(declaredType, mediaType);
              Marshaller marshaller = jaxbContext.createMarshaller();
              String charset = getCharset(mediaType);
              if (!isNullOrEmpty(charset)) {
                  marshaller.setProperty(Marshaller.JAXB_ENCODING, charset);
              }
  
              marshaller.marshal(t, entityStream);
          } catch (JAXBException e) {
              throw new IOException(String.format("Can't write to output stream, %s", e));
          }
      }
focal_method.class_method_signature: JAXBElementEntityProvider.writeTo(JAXBElement<?> t,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_method.full_signature: @Override public void writeTo(JAXBElement<?> t,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_method.identifier: writeTo
focal_method.invocations: getDeclaredType getJAXBContext createMarshaller getCharset isNullOrEmpty setProperty marshal format
focal_method.modifiers: @Override public
focal_method.parameters: (JAXBElement<?> t,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)
focal_method.return: void
focal_method.signature: void writeTo(JAXBElement<?> t,
                          Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          MediaType mediaType,
                          MultivaluedMap<String, Object> httpHeaders,
                          OutputStream entityStream)