comparison src/org/eclipse/jetty/io/ByteArrayBuffer.java @ 1018:4dc1e1a18661

remove HttpSchemes
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 24 Oct 2016 05:37:24 -0600
parents 2712133d5bce
children 6647dbc8be71
comparison
equal deleted inserted replaced
1017:d2c3ff33387c 1018:4dc1e1a18661
23 import java.io.OutputStream; 23 import java.io.OutputStream;
24 import java.io.UnsupportedEncodingException; 24 import java.io.UnsupportedEncodingException;
25 25
26 import org.eclipse.jetty.util.StringUtil; 26 import org.eclipse.jetty.util.StringUtil;
27 27
28 /* ------------------------------------------------------------------------------- */ 28
29 /**
30 *
31 */
32 public class ByteArrayBuffer extends AbstractBuffer 29 public class ByteArrayBuffer extends AbstractBuffer
33 { 30 {
34 // Set a maximum size to a write for the writeTo method, to ensure that very large content is not 31 // Set a maximum size to a write for the writeTo method, to ensure that very large content is not
35 // written as a single write (which may fall foul to write timeouts if consumed slowly). 32 // written as a single write (which may fall foul to write timeouts if consumed slowly).
36 final static int MAX_WRITE=Integer.getInteger("org.eclipse.jetty.io.ByteArrayBuffer.MAX_WRITE",128*1024); 33 final static int MAX_WRITE=Integer.getInteger("org.eclipse.jetty.io.ByteArrayBuffer.MAX_WRITE",128*1024);
380 if (len<0 && total==0) 377 if (len<0 && total==0)
381 return -1; 378 return -1;
382 return total; 379 return total;
383 } 380 }
384 381
385 /* ------------------------------------------------------------ */
386 @Override 382 @Override
387 public int space() 383 public int space()
388 { 384 {
389 return _bytes.length - _put; 385 return _bytes.length - _put;
390 } 386 }
391 387
392 388
393 /* ------------------------------------------------------------ */
394 /* ------------------------------------------------------------ */
395 /* ------------------------------------------------------------ */
396 public static class CaseInsensitive extends ByteArrayBuffer implements Buffer.CaseInsensitve 389 public static class CaseInsensitive extends ByteArrayBuffer implements Buffer.CaseInsensitve
397 { 390 {
398 public CaseInsensitive(String s) 391 public CaseInsensitive(String s)
399 { 392 {
400 super(s); 393 super(s);