Added a missing flip()
Fixed wrong method name
Using duplicate() to avoid restoring position and limit
Fixed CloseShieldChannel being closed on initialization
Fixed non-zero files when writing empty buffers