Java URI from toUriString(final Object object)

Here you can find the source of toUriString(final Object object)

Description

to Uri String

License

Open Source License

Declaration

private static String toUriString(final Object object) 

Method Source Code

//package com.java2s;
/*//ww  w.  j  ava  2  s.c o m
 * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

import java.net.URLEncoder;

public class Main {
    private static String toUriString(final Object object) {
        if (object == null) {
            return "";
        }
        String _string = object.toString();
        return URLEncoder.encode(_string);
    }
}

Related

  1. toURIs(File... files)
  2. toURIs(Iterable files)
  3. toURIs(String[] filePaths)
  4. toUriString(File file)
  5. toURIString(File file)