do we need to have an else clause? if getcontent doesnt return an empty buffer ? what exception should we throw then?