protected Response < T > parseNetworkResponse ( NetworkResponse response ) { T parsed = null ; try { parsed = converterFromResponse . convert ( response ) ; } catch ( Exception e ) { return Response . error ( new ParseError ( e ) ) ; } return Response . success ( parsed , HttpHeaderParser . parseCacheHeaders ( response ) ) ; }
Subclasses can implement this to parse the raw network response and return an appropriate response type . This method will be called from a worker threadId . The response will not be delivered if you return null .