public String [ ] getHeaders ( ) throws IOException { checkClosed ( ) ; if ( headersHolder . Headers == null ) { return null ; } else { // use clone here to prevent the outside code from // setting values on the array directly, which would // throw off the index lookup based on header name String [ ] clone = new String [ headersHolder . Length ] ; System . arraycopy ( headersHolder . Headers , 0 , clone , 0 , headersHolder . Length ) ; return clone ; } }
Returns the header values as a string array .