Class ServletUtils.ByteAccumulator

  • Enclosing class:
    ServletUtils

    private static class ServletUtils.ByteAccumulator
    extends java.lang.Object
    Accumulates byte sequences while decoding strings, and encodes them into a StringBuilder.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] bytes  
      private java.nio.charset.Charset encoding  
      private int length  
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteAccumulator​(int capacity, java.nio.charset.Charset encoding)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void append​(byte b)  
      (package private) void dumpTo​(java.lang.StringBuilder dest)  
      private void ensureCapacity​(int minCapacity)  
      (package private) boolean isEmpty()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bytes

        private byte[] bytes
      • length

        private int length
      • encoding

        private final java.nio.charset.Charset encoding
    • Constructor Detail

      • ByteAccumulator

        ByteAccumulator​(int capacity,
                        java.nio.charset.Charset encoding)
    • Method Detail

      • append

        void append​(byte b)
      • dumpTo

        void dumpTo​(java.lang.StringBuilder dest)
      • isEmpty

        boolean isEmpty()
      • ensureCapacity

        private void ensureCapacity​(int minCapacity)