code: protected byte[] ensureBufferSize(final int size, final Context context){
          if ((context.buffer == null) || (context.buffer.length < context.pos + size)){
              return resizeBuffer(context);
          }
          return context.buffer;
      }
docs: Ensure that the buffer has room for <code>size</code> bytes
  
  @param size minimum spare space required
  @param context the context to be used