Home » HttpComponents-Core-4.0.1 » org.apache.http.mockup » [javadoc | source]

    1   package org.apache.http.mockup;
    2   
    3   import java.io.IOException;
    4   import java.io.InputStream;
    5   import java.io.OutputStream;
    6   
    7   import org.apache.http.entity.AbstractHttpEntity;
    8   
    9   /**
   10    * {@link AbstractHttpEntity} mockup implementation.
   11    *
   12    * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
   13    */
   14   public class HttpEntityMockup extends AbstractHttpEntity {
   15   
   16       private boolean stream;
   17       
   18       public InputStream getContent() throws IOException, IllegalStateException {
   19           return null;
   20       }
   21   
   22       public long getContentLength() {
   23           return 0;
   24       }
   25   
   26       public boolean isRepeatable() {
   27           return false;
   28       }
   29   
   30       public void setStreaming(final boolean b) {
   31           this.stream = b;
   32       }
   33   
   34       public boolean isStreaming() {
   35           return this.stream;
   36       }
   37   
   38       public void writeTo(OutputStream outstream) throws IOException {
   39       }    
   40       
   41   }

Home » HttpComponents-Core-4.0.1 » org.apache.http.mockup » [javadoc | source]