Modeling Maxwell's demon with a microcanonical Szilard engine.