private String urlEncodeFilters ( final Map < String , List < String > > filters ) throws DockerException { try { final String unencodedFilters = objectMapper ( ) . writeValueAsString ( filters ) ; if ( ! unencodedFilters . isEmpty ( ) ) { return urlEncode ( unencodedFilters ) ; } } catch ( IOException e ) { throw new DockerException ( e ) ; } return null ; }
Takes a map of filters and URL - encodes them . If the map is empty or an exception occurs return null .