Code example for MethodNotSupportedException

0
				Log.v(TAG, "reqLine=" + reqLine); 
 
				String method = reqLine.getMethod().toUpperCase(Locale.ENGLISH); 
				if (method.equals("GET") == false) 
				{ 
					throw new MethodNotSupportedException(method + 
					  " method not supported"); 
				} 
 
				RandomAccessStream stream = mStream.newInstance(); 
 
				/* Side-effect: will open the stream, so we can seek if 
				 * necessary. */ 
				RandomAccessStreamEntity ent = 
				  new RandomAccessStreamEntity(stream); 
 
				interpretRangeThenSeek(request, stream); 
 
				response.setHeader("Accept-Ranges", "bytes"); 
				response.setEntity(ent); 
				response.setStatusCode(HttpStatus.SC_OK);