New saveResource return function

Little extend for saveResource, javadoc also added.
Random newline here, full of spaces