Example usage for java.nio.file InvalidPathException getInput

List of usage examples for java.nio.file InvalidPathException getInput

Introduction

In this page you can find the example usage for java.nio.file InvalidPathException getInput.

Prototype

public String getInput() 

Source Link

Document

Returns the input string.

Usage

From source file:Test.java

public static void main(String[] args) {
    try {/*  ww w . java2 s  .c  om*/
        Path path = Paths.get("/home\0", "docs", "users.txt");
        System.out.println("Absolute path: " + path.toAbsolutePath());
    } catch (InvalidPathException ex) {
        System.out.println("Bad path: [" + ex.getInput() + "] at position " + ex.getIndex());
    }

}