Close is a no-op on byte array streams. You can delete this and the whole try/finally wrapper.