# File lib/puma/java_io_buffer.rb, line 14 def initialize @buf = JavaIOBuffer.new(BUF_DEFAULT_SIZE) end
# File lib/puma/java_io_buffer.rb, line 22 def <<(str) bytes = str.to_java_bytes @buf.write(bytes, 0, bytes.length) end
# File lib/puma/java_io_buffer.rb, line 27 def append(*strs) strs.each { |s| self << s; } end
# File lib/puma/java_io_buffer.rb, line 41 def capacity @buf.buf.length end
# File lib/puma/java_io_buffer.rb, line 18 def reset @buf.reset end
# File lib/puma/java_io_buffer.rb, line 31 def to_s String.from_java_bytes @buf.to_byte_array end
# File lib/puma/java_io_buffer.rb, line 37 def used @buf.size end