Code example for HttpResponse

Methods: setEntity, setHeader, setStatusCode

0
				RandomAccessStreamEntity ent = 
				  new RandomAccessStreamEntity(stream); 
 
				interpretRangeThenSeek(request, stream); 
 
				response.setHeader("Accept-Ranges", "bytes"); 
				response.setEntity(ent); 
				response.setStatusCode(HttpStatus.SC_OK); 
			} 
		}; 
 
		public class RandomAccessStreamEntity 
		  extends AbstractHttpEntity
		{ 
			private final static int BUFFER_SIZE = 2048;
 
			private final RandomAccessStream mStream;
			private final long mLength;
			private boolean mConsumed = false;
 
			public RandomAccessStreamEntity(RandomAccessStream stream)