org.cloudfoundry.client.lib.util
Class UploadApplicationPayloadHttpMessageConverter

java.lang.Object
  extended by org.cloudfoundry.client.lib.util.UploadApplicationPayloadHttpMessageConverter
All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<UploadApplicationPayload>

public class UploadApplicationPayloadHttpMessageConverter
extends Object
implements org.springframework.http.converter.HttpMessageConverter<UploadApplicationPayload>

Implementation of HttpMessageConverter that can write UploadApplicationPayloads. The Content-Type of written resources is application/octet-stream.

Author:
Phillip Webb

Constructor Summary
UploadApplicationPayloadHttpMessageConverter()
           
 
Method Summary
 boolean canRead(Class<?> clazz, org.springframework.http.MediaType mediaType)
           
 boolean canWrite(Class<?> clazz, org.springframework.http.MediaType mediaType)
           
 List<org.springframework.http.MediaType> getSupportedMediaTypes()
           
 UploadApplicationPayload read(Class<? extends UploadApplicationPayload> clazz, org.springframework.http.HttpInputMessage inputMessage)
           
 void write(UploadApplicationPayload t, org.springframework.http.MediaType contentType, org.springframework.http.HttpOutputMessage outputMessage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadApplicationPayloadHttpMessageConverter

public UploadApplicationPayloadHttpMessageConverter()
Method Detail

canRead

public boolean canRead(Class<?> clazz,
                       org.springframework.http.MediaType mediaType)
Specified by:
canRead in interface org.springframework.http.converter.HttpMessageConverter<UploadApplicationPayload>

canWrite

public boolean canWrite(Class<?> clazz,
                        org.springframework.http.MediaType mediaType)
Specified by:
canWrite in interface org.springframework.http.converter.HttpMessageConverter<UploadApplicationPayload>

getSupportedMediaTypes

public List<org.springframework.http.MediaType> getSupportedMediaTypes()
Specified by:
getSupportedMediaTypes in interface org.springframework.http.converter.HttpMessageConverter<UploadApplicationPayload>

read

public UploadApplicationPayload read(Class<? extends UploadApplicationPayload> clazz,
                                     org.springframework.http.HttpInputMessage inputMessage)
                              throws IOException,
                                     org.springframework.http.converter.HttpMessageNotReadableException
Specified by:
read in interface org.springframework.http.converter.HttpMessageConverter<UploadApplicationPayload>
Throws:
IOException
org.springframework.http.converter.HttpMessageNotReadableException

write

public void write(UploadApplicationPayload t,
                  org.springframework.http.MediaType contentType,
                  org.springframework.http.HttpOutputMessage outputMessage)
           throws IOException,
                  org.springframework.http.converter.HttpMessageNotWritableException
Specified by:
write in interface org.springframework.http.converter.HttpMessageConverter<UploadApplicationPayload>
Throws:
IOException
org.springframework.http.converter.HttpMessageNotWritableException


Copyright © 2013. All rights reserved.