write(byte[],int, int length) only needs to check for the length, not the length of the byte[]