Simplify API
Not sure why this API has calling conventions that vary so drastically from method to method. Since this is still in M2 stage, it seems like it is still not too late to fix this. One problem with the existing code is that it violates Effective Java 3rd Edition §74, which says:
Use the Javadoc
@throwstag to document each exception that a method can throw, but do not use thethrowskeyword on unchecked exceptions.
Another problem with the existing code is that FileItem#getString(Charset) is inconsistent with FileItem#getString()—one declares throws IOException while the other does not, yet it is not obvious how the presence of a Charset argument should cause any difference in calling convention.
Yet another problem with the existing code is that DiskFileItem#getString(java.nio.charset.Charset) claims to throw IOException but is actually implemented with DiskFileItem#get() which actually throws UncheckedIOException.
This PR fixes all of these problems by eliminating any usages of UncheckedIOException in favor of simple usages of throws IOException.