comparison src/org/eclipse/jetty/server/HttpOutput.java @ 982:dbecd7faa1f5

remove Generator
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 16 Oct 2016 21:40:27 -0600
parents 5ee36654b383
children 23ec25435b8c
comparison
equal deleted inserted replaced
981:f46de416e219 982:dbecd7faa1f5
22 import java.io.Writer; 22 import java.io.Writer;
23 23
24 import javax.servlet.ServletOutputStream; 24 import javax.servlet.ServletOutputStream;
25 25
26 import org.eclipse.jetty.http.AbstractGenerator; 26 import org.eclipse.jetty.http.AbstractGenerator;
27 import org.eclipse.jetty.http.Generator; 27 import org.eclipse.jetty.http.HttpGenerator;
28 import org.eclipse.jetty.io.Buffer; 28 import org.eclipse.jetty.io.Buffer;
29 import org.eclipse.jetty.io.ByteArrayBuffer; 29 import org.eclipse.jetty.io.ByteArrayBuffer;
30 import org.eclipse.jetty.io.EofException; 30 import org.eclipse.jetty.io.EofException;
31 import org.eclipse.jetty.util.ByteArrayOutputStream2; 31 import org.eclipse.jetty.util.ByteArrayOutputStream2;
32 32
150 if (!_generator.isOpen()) 150 if (!_generator.isOpen())
151 throw new EofException(); 151 throw new EofException();
152 } 152 }
153 153
154 // Add the _content 154 // Add the _content
155 _generator.addContent(buffer, Generator.MORE); 155 _generator.addContent(buffer, HttpGenerator.MORE);
156 156
157 // Have to flush and complete headers? 157 // Have to flush and complete headers?
158 158
159 if (_generator.isAllContentWritten()) 159 if (_generator.isAllContentWritten())
160 { 160 {
161 flush(); 161 flush();
162 close(); 162 close();
163 } 163 }
164 else if (_generator.isBufferFull()) 164 else if (_generator.isBufferFull())
165 _connection.commitResponse(Generator.MORE); 165 _connection.commitResponse(HttpGenerator.MORE);
166 166
167 // Block until our buffer is free 167 // Block until our buffer is free
168 while (buffer.length() > 0 && _generator.isOpen()) 168 while (buffer.length() > 0 && _generator.isOpen())
169 { 169 {
170 _generator.blockForOutput(getMaxIdleTime()); 170 _generator.blockForOutput(getMaxIdleTime());