org.openrdf.http.object.writers
Class InputStreamBodyWriter

java.lang.Object
  extended by org.openrdf.http.object.writers.InputStreamBodyWriter
All Implemented Interfaces:
MessageBodyWriter<InputStream>

public class InputStreamBodyWriter
extends Object
implements MessageBodyWriter<InputStream>

Writes an InputStream into an OutputStream.


Constructor Summary
InputStreamBodyWriter()
           
 
Method Summary
 String getContentType(MessageType mtype, Charset charset)
           
 long getSize(MessageType mtype, InputStream result, Charset charset)
           
 boolean isText(MessageType mtype)
           
 boolean isWriteable(MessageType mtype)
           
 ReadableByteChannel write(MessageType mtype, InputStream result, String base, Charset charset)
           
 void writeTo(MessageType mtype, InputStream result, String base, Charset charset, OutputStream out, int bufSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamBodyWriter

public InputStreamBodyWriter()
Method Detail

isText

public boolean isText(MessageType mtype)
Specified by:
isText in interface MessageBodyWriter<InputStream>

getSize

public long getSize(MessageType mtype,
                    InputStream result,
                    Charset charset)
Specified by:
getSize in interface MessageBodyWriter<InputStream>

isWriteable

public boolean isWriteable(MessageType mtype)
Specified by:
isWriteable in interface MessageBodyWriter<InputStream>

getContentType

public String getContentType(MessageType mtype,
                             Charset charset)
Specified by:
getContentType in interface MessageBodyWriter<InputStream>

write

public ReadableByteChannel write(MessageType mtype,
                                 InputStream result,
                                 String base,
                                 Charset charset)
                          throws IOException
Specified by:
write in interface MessageBodyWriter<InputStream>
Throws:
IOException

writeTo

public void writeTo(MessageType mtype,
                    InputStream result,
                    String base,
                    Charset charset,
                    OutputStream out,
                    int bufSize)
             throws IOException
Throws:
IOException


Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.