public BoxFile.Info getInfoWithRepresentations(String representationHints, String... fields) {
        if (representationHints.matches(Representation.X_REP_HINTS_PATTERN)) {
            //Since the user intends to get representations, add it to fields, even if user has missed it
            Set<String> fieldsSet = new HashSet<String>(Arrays.asList(fields));
            fieldsSet.add("representations");
            String queryString = new QueryStringBuilder().appendParam("fields",
                fieldsSet.toArray(new String[fieldsSet.size()])).toString();
            URL url = FILE_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID());

            BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
            request.addHeader("X-Rep-Hints", representationHints);
            BoxJSONResponse response = (BoxJSONResponse) request.send();
            return new Info(response.getJSON());
        } else {
            throw new BoxAPIException("Represention hints is not valid."
                + " Refer documention on how to construct X-Rep-Hints Header");
        }
    }
public BoxFile . Info getInfoWithRepresentations ( String representationHints , String ... fields ) { if ( representationHints . matches ( Representation . X_REP_HINTS_PATTERN ) ) { Set < String > fieldsSet = new HashSet < String > ( Arrays . asList ( fields ) ) ; fieldsSet . add ( "representations" ) ; String queryString = new QueryStringBuilder ( ) . appendParam ( "fields" , fieldsSet . toArray ( new String [ fieldsSet . size ( ) ] ) ) . toString ( ) ; URL url = FILE_URL_TEMPLATE . buildWithQuery ( this . getAPI ( ) . getBaseURL ( ) , queryString , this . getID ( ) ) ; BoxAPIRequest request = new BoxAPIRequest ( this . getAPI ( ) , url , "GET" ) ; request . addHeader ( "X-Rep-Hints" , representationHints ) ; BoxJSONResponse response = ( BoxJSONResponse ) request . send ( ) ; return new Info ( response . getJSON ( ) ) ; } else { throw new BoxAPIException ( "Represention hints is not valid." + " Refer documention on how to construct X-Rep-Hints Header" ) ; } }
Gets information about this item including a specified set of representations.
@see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a>

@param representationHints hints for representations to be retrieved
@param fields the fields to retrieve.
@return info about this item containing only the specified fields, including representations.