A method and apparatus of image forming includes an optical writing device
and an image carrier. The optical writing device includes a housing, a
dustproof member, a light source, and a shield. The housing is provided
with an opening. The dustproof member is light permeable and closes the
opening. The light source is installed in the housing and irradiates the
image carrier with a light beam through the dustproof member. The shield
is movable between a first position to cover the dustproof member and a
second position to uncover the dustproof member. The optical writing
device also includes a cleaner attached to the shield and contact the
dustproof member. The optical writing device also includes a driver for
moving the shield. The optical writing device further includes a
positioning mechanism for positioning the shield to the first position by
using the driver.