diff src/org/eclipse/jetty/io/JBuffer.java @ 1054:87275900646e

remove JBuffer.toString()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 08 Nov 2016 01:03:02 -0700
parents 7e4b41247544
children 013939bfc9e8
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/JBuffer.java	Tue Nov 08 00:32:02 2016 -0700
+++ b/src/org/eclipse/jetty/io/JBuffer.java	Tue Nov 08 01:03:02 2016 -0700
@@ -61,6 +61,10 @@
 		return bb.get();
 	}
 
+	public void get(byte[] bytes) {
+		bb.get(bytes);
+	}
+
 	public void compact() {
 		int n = bb.remaining();
 		bb.compact();
@@ -173,30 +177,10 @@
 	}
 
 	@Override
-	public String toString()
-	{
-		return toString("ISO-8859-1");
-	}
-
-	public final String toString(int index, int length) {
-		ByteBuffer dup = bb.duplicate();
-		dup.limit(index+length);
-		dup.position(index);
-		return new JBuffer(dup).toString();
-	}
-
-	private final String toString(String charset)
-	{
-		byte[] bytes = asArray();
-		try
-		{
-			return new String(bytes,charset);
-		}
-		catch(Exception e)
-		{
-			LOG.warn("",e);
-			return new String(bytes);
-		}
+	public String toString() {
+//		return toString("ISO-8859-1");
+//		Thread.dumpStack();
+		throw new RuntimeException("toString");
 	}