public virtual void close() { /* If the buffer has been changed, it need to be saved before * closing */ flush(); byteBuffer = null; // Release the byte-buffer reference }