Protocol handler for res: protocol, loads stream from Java resource.