Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Jackson JAXB Annotations Source Code
Jackson JAXB Annotations Source Code files are provided in the source packge (jackson-module-jaxb-annotations-2.14.0-sources.jar). You can download it at Jackson Base module Maven Website.
You can also browse Jackson JAXB Annotations Source Code below:
✍: FYIcenter.com
⏎ com/fasterxml/jackson/module/jaxb/deser/DataHandlerJsonDeserializer.java
package com.fasterxml.jackson.module.jaxb.deser;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.ByteArrayInputStream;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer;
/**
* @author Ryan Heaton
*/
public class DataHandlerJsonDeserializer
extends StdScalarDeserializer<DataHandler>
{
private static final long serialVersionUID = 1L;
public DataHandlerJsonDeserializer() { super(DataHandler.class); }
@Override
public DataHandler deserialize(JsonParser jp, DeserializationContext ctxt)
throws IOException, JsonProcessingException
{
final byte[] value = jp.getBinaryValue();
return new DataHandler(new DataSource() {
@Override
public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(value);
}
@Override
public OutputStream getOutputStream() throws IOException {
throw new IOException();
}
@Override
public String getContentType() {
return "application/octet-stream";
}
@Override
public String getName() {
return "json-binary-data";
}
});
}
}
⏎ com/fasterxml/jackson/module/jaxb/deser/DataHandlerJsonDeserializer.java
Or download all of them as a single archive file:
File name: jackson-module-jaxb-annotations-2.14.0-sources.jar File size: 27411 bytes Release date: 2022-11-05 Download
⇒ jackson-core-2.2.3.jar - Jackson
2022-05-03, ∼5520🔥, 1💬
Popular Posts:
JDK 11 jdk.jdeps.jmod is the JMOD file for JDK 11 JDeps tool, which can be invoked by the "jdeps" co...
How to perform XML Schema validation with dom\Writer.java provided in the Apache Xerces package? You...
The Apache FontBox library is an open source Java tool to obtain low level information from font fil...
Guava is a suite of core and expanded libraries that include utility classes, google's collections, ...
How to download and install JDK (Java Development Kit) 1.4? If you want to write Java applications, ...