Constant current power supplies

Here is one out of a broke led light bulb I bet it's made right off the data sheet
the chip on this one is LNK562-564. It was rated at 300mA

The circuit shown in Figure 5 is a typical implementation of
a 6 V, 330 mA, constant voltage, constant current (CV/CC)
output power supply.

http://www.powerint.com/sites/default/files/product-docs/linklp_family_datasheet.pdf

Led Suppy.jpg