View Javadoc
1 /* Reattore HTTP Server 2 3 Copyright (C) 2002 Michael Hope <michaelh@juju.net.nz> 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 19 $Id: HttpParser.java,v 1.10 2003/02/18 04:11:47 michaelh Exp $ 20 */ 21 22 package juju.reattore.protocol.http; 23 24 import java.util.*; 25 import java.io.IOException; 26 27 import juju.reattore.io.*; 28 29 /*** Stateful HTTP parser that will parse blocks of bytes as they are 30 fed in. 31 */ 32 public interface HttpParser { 33 /*** Takes the next set of data and parses it into headers and body 34 as the data is made available. Returns a list of all of the 35 messages just parsed as HttpRequests objects. Will be empty 36 if more data is needed. 37 38 @param source A source to read from. Not all data may be 39 read. 40 @return A list of all of the messages parsed due to adding 41 this data. Never null. 42 @throws ParseException if an error occurs while parsing. 43 @throws IOException on error. 44 */ 45 List add(ByteSource source) 46 throws ParseException, IOException; 47 }

This page was automatically generated by Maven