@softener - Methadone is used as a long-term treatment program for oxycodone addiction where the addict slowly take less and less methadone over time. However buprenorphine - commonly known as Suboxone - has been shown to work better for withdrawal and has a shorter detox time. My cousin was treated this way for heroin detox and he's been doing much better. It can also be used in the same long-term maintenance way as methadone.
This applies for all painkillers including pills like Percocet as they're all just different kinds of opiates.