comparison src/org/eclipse/jetty/io/AbstractBuffer.java @ 1039:a7319f14ba1e

remove Buffer.isImmutable()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 03 Nov 2016 22:55:28 -0600
parents b71ad168fe34
children 3e4949834f3e
comparison
equal deleted inserted replaced
1038:b71ad168fe34 1039:a7319f14ba1e
37 37
38 private final static boolean __boundsChecking = Boolean.getBoolean("org.eclipse.jetty.io.AbstractBuffer.boundsChecking"); 38 private final static boolean __boundsChecking = Boolean.getBoolean("org.eclipse.jetty.io.AbstractBuffer.boundsChecking");
39 39
40 protected final static String __READONLY = "READONLY"; 40 protected final static String __READONLY = "READONLY";
41 41
42 protected int _access; 42 int _access;
43 43
44 protected int _get; 44 protected int _get;
45 protected int _put; 45 protected int _put;
46 protected int _hash; 46 protected int _hash;
47 protected int _hashGet; 47 protected int _hashGet;
48 protected int _hashPut; 48 protected int _hashPut;
49 protected int _mark; 49 protected int _mark;
50 protected String _string;
51 protected View _view; 50 protected View _view;
52 51
53 /** 52 /**
54 * Constructor for BufferView 53 * Constructor for BufferView
55 * 54 *
56 * @param access 0==IMMUTABLE, 1==READONLY, 2==READWRITE 55 * @param access 1==READONLY, 2==READWRITE
57 */ 56 */
58 protected AbstractBuffer(int access) 57 protected AbstractBuffer(int access)
59 { 58 {
60 setMarkIndex(-1); 59 setMarkIndex(-1);
61 _access = access; 60 _access = access;
210 209
211 } 210 }
212 return _hash; 211 return _hash;
213 } 212 }
214 213
215 public boolean isImmutable()
216 {
217 return _access <= IMMUTABLE;
218 }
219
220 public boolean isReadOnly() 214 public boolean isReadOnly()
221 { 215 {
222 return _access <= READONLY; 216 return _access <= READONLY;
223 } 217 }
224 218
468 } 462 }
469 463
470 @Override 464 @Override
471 public String toString() 465 public String toString()
472 { 466 {
473 /*
474 if (isImmutable())
475 {
476 if (_string == null)
477 _string = new String(asArray(), 0, remaining());
478 return _string;
479 }
480 return new String(asArray(), 0, remaining());
481 */
482 return toString("ISO-8859-1"); 467 return toString("ISO-8859-1");
483 } 468 }
484 469
485 @Override 470 @Override
486 public final String toString(int index, int length) { 471 public final String toString(int index, int length) {