diff src/org/eclipse/jetty/io/ByteArrayBuffer.java @ 1039:a7319f14ba1e

remove Buffer.isImmutable()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 03 Nov 2016 22:55:28 -0600
parents b71ad168fe34
children dd71a59fcf72
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/ByteArrayBuffer.java	Thu Nov 03 22:16:11 2016 -0600
+++ b/src/org/eclipse/jetty/io/ByteArrayBuffer.java	Thu Nov 03 22:55:28 2016 -0600
@@ -50,11 +50,10 @@
 
 	public ByteArrayBuffer(byte[] bytes, int index, int length, int access)
 	{
-		super(READWRITE);
+		super(access);
 		_bytes = bytes;
 		setPutIndex(index + length);
 		setGetIndex(index);
-		_access = access;
 	}
 
 	public ByteArrayBuffer(int size)
@@ -65,12 +64,10 @@
 
 	public ByteArrayBuffer(String value)
 	{
-		super(READWRITE);
+		super(READONLY);
 		_bytes = StringUtil.getBytes(value);
 		setGetIndex(0);
 		setPutIndex(_bytes.length);
-		_access=IMMUTABLE;
-		_string = value;
 	}
 
 	@Override