Java tutorial
//package com.java2s; public class Main { public static String changleName(String fileName) { if (fileName != null && fileName.contains(".pdf")) { int index = fileName.indexOf("|") + 1; if (index >= 0) { fileName = fileName.substring(index, fileName.length()); } } return fileName; } }