All-optical nanosecond wavelength reassignment for fast optical-packet switching