CheckStatusCode and getAtomHeaders

CheckStatusCode and getAtomHeaders
Merge pull request #1464 from CarlosManias/java-refactor-checkStatusCode

Java refactor check status code