title: Is there a cross-platform Java method to remove filename special chars?
body: <p>I'm making a cross-platform application that renames files based on data retrieved online. I'd like to sanitize the Strings I took from a web API for the current platform.</p>
  
  <p>I know that different platforms have different file-name requirements, so I was wondering if there's a cross-platform way to do this?</p>
  
  <p><strong>Edit:</strong> On Windows platforms you cannot have a question mark '?' in a file name, whereas in Linux, you can. The file names may contain such characters and I would like for the platforms that support those characters to keep them, but otherwise, strip them out.</p>
  
  <p>Also, I would prefer a standard Java solution that doesn't require third-party libraries.</p>