Work around buffer issue in jruby's decoder.