Code example for StringTokenizer

Methods: nextToken

0
			if (firstLine == null) {
				Log.i(TAG, "Proxy client closed connection without a request.");
				return request;
			} 
 
			StringTokenizer st = new StringTokenizer(firstLine);
			String method = st.nextToken();
			String uri = st.nextToken();
			String realUri = uri.substring(1);
			Log.i(TAG, realUri);
			request = new BasicHttpRequest(method, realUri);
			return request;
		} 
 
		public boolean processRequest() { 
			HttpRequest request = readRequest();
			if (request == null) {
				return false; 
			} 
			 
			// Read HTTP headers