Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2012 Ness Computing, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package com.nesscomputing.jersey.json;
 
 
 
 
Jersey Provider class that allows Jackson to serialize any media type starting with x-ness. By default, only types that end with +json will be matched.
 
 @Produces("x-ness/*")
 @Consumes("x-ness/*")
 {
     private final JacksonJsonProvider delegate;
 
     @Inject
     {
         this. = delegate;
     }
 
     @Override
     public Version version()
     {
         return .version();
     }
 
     @Override
     public boolean isReadable(Class<?> typeType genericTypeAnnotation[] annotationsMediaType mediaType)
     {
         return .isReadable(typegenericTypeannotationsmediaType);
     }
 
     @Override
     public Object readFrom(Class<ObjecttypeType genericTypeAnnotation[] annotationsMediaType mediaType,
             MultivaluedMap<StringStringhttpHeadersInputStream entityStreamthrows IOException
     {
         return .readFrom(typegenericTypeannotationsmediaTypehttpHeadersentityStream);
     }
 
     @Override
     public long getSize(Object valueClass<?> typeType genericTypeAnnotation[] annotationsMediaType mediaType)
     {
         return .getSize(valuetypegenericTypeannotationsmediaType);
     }
 
     @Override
     public boolean isWriteable(Class<?> typeType genericTypeAnnotation[] annotationsMediaType mediaType)
     {
         return .isWriteable(typegenericTypeannotationsmediaType);
     }
 
     @Override
     public void writeTo(Object valueClass<?> typeType genericTypeAnnotation[] annotationsMediaType mediaType,
             MultivaluedMap<StringObjecthttpHeadersOutputStream entityStreamthrows IOException
     {
         .writeTo(valuetypegenericTypeannotationsmediaTypehttpHeadersentityStream);
     }
 
     @Override
     public String toString()
     {
         return "NessJacksonJsonProvider: " + .toString();
    }
New to GrepCode? Check out our FAQ X