comparison src/org/eclipse/jetty/io/ByteArrayBuffer.java @ 1026:6647dbc8be71

remove Buffer.CaseInsensitve
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 02 Nov 2016 23:52:33 -0600
parents 4dc1e1a18661
children 4e5e9e3c25b3
comparison
equal deleted inserted replaced
1025:cf0367978d8b 1026:6647dbc8be71
141 if (obj==this) 141 if (obj==this)
142 return true; 142 return true;
143 143
144 if (obj == null || !(obj instanceof Buffer)) 144 if (obj == null || !(obj instanceof Buffer))
145 return false; 145 return false;
146
147 if (obj instanceof Buffer.CaseInsensitve)
148 return equalsIgnoreCase((Buffer)obj);
149 146
150 147
151 Buffer b = (Buffer) obj; 148 Buffer b = (Buffer) obj;
152 149
153 // reject different lengths 150 // reject different lengths
383 public int space() 380 public int space()
384 { 381 {
385 return _bytes.length - _put; 382 return _bytes.length - _put;
386 } 383 }
387 384
388
389 public static class CaseInsensitive extends ByteArrayBuffer implements Buffer.CaseInsensitve
390 {
391 public CaseInsensitive(String s)
392 {
393 super(s);
394 }
395
396 public CaseInsensitive(byte[] b, int o, int l, int rw)
397 {
398 super(b,o,l,rw);
399 }
400
401 @Override
402 public boolean equals(Object obj)
403 {
404 return obj instanceof Buffer && equalsIgnoreCase((Buffer)obj);
405 }
406
407 }
408 } 385 }