Unless you really want the 1k buffer, you could just use ByteStreams.copy() (from Guava).