Tabnine Logo
BaseClientResponse.readFrom
Code IndexAdd Tabnine to your IDE (free)

How to use
readFrom
method
in
org.jboss.resteasy.client.core.BaseClientResponse

Best Java code snippets using org.jboss.resteasy.client.core.BaseClientResponse.readFrom (Showing top 2 results out of 315)

origin: org.jboss.resteasy/resteasy-jaxrs-20

@Override
public <T2> T2 getEntity(Class<T2> type, Type genericType, Annotation[] anns)
{
 if (exception != null)
 {
   throw new RuntimeException(Messages.MESSAGES.unableToUnmarshalResponse(attributeExceptionsTo), exception);
 }
 if (unmarshaledEntity != null && !type.isInstance(this.unmarshaledEntity))
   throw new RuntimeException(Messages.MESSAGES.entityAlreadyRead(unmarshaledEntity.getClass()));
 if (unmarshaledEntity == null)
 {
   if (status == HttpResponseCodes.SC_NO_CONTENT)
    return null;
   unmarshaledEntity = readFrom(type, genericType, getMediaType(), anns);
   // only release connection if we actually unmarshalled something and if the object is *NOT* an InputStream
   // If it is an input stream, the user may be doing their own stream processing.
   if (unmarshaledEntity != null && !InputStream.class.isInstance(unmarshaledEntity)) releaseConnection();
 }
 return (T2) unmarshaledEntity;
}
origin: org.jboss.resteasy/resteasy-legacy

@Override
public <T2> T2 getEntity(Class<T2> type, Type genericType, Annotation[] anns)
{
 if (exception != null)
 {
   throw new RuntimeException(Messages.MESSAGES.unableToUnmarshalResponse(attributeExceptionsTo), exception);
 }
 if (unmarshaledEntity != null && !type.isInstance(this.unmarshaledEntity))
   throw new RuntimeException(Messages.MESSAGES.entityAlreadyRead(unmarshaledEntity.getClass()));
 if (unmarshaledEntity == null)
 {
   if (status == HttpResponseCodes.SC_NO_CONTENT)
    return null;
   unmarshaledEntity = readFrom(type, genericType, getMediaType(), anns);
   // only release connection if we actually unmarshalled something and if the object is *NOT* an InputStream
   // If it is an input stream, the user may be doing their own stream processing.
   if (unmarshaledEntity != null && !InputStream.class.isInstance(unmarshaledEntity)) releaseConnection();
 }
 return (T2) unmarshaledEntity;
}
org.jboss.resteasy.client.coreBaseClientResponsereadFrom

Popular methods of BaseClientResponse

  • getStreamFactory
  • setReturnType
  • getEntity
  • getMetadata
  • getStatus
  • <init>
  • setAnnotations
  • setAttributeExceptionsTo
  • setHeaders
  • setProviderFactory
  • setStatus
  • checkFailureStatus
  • setStatus,
  • checkFailureStatus,
  • copyFromError,
  • createResponseFailure,
  • getAnnotations,
  • getLinkHeader,
  • getLocationLink,
  • getMediaType,
  • getResponseHeader,
  • getResponseHeaders

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • Path (java.nio.file)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JComboBox (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now