2525import java .io .OutputStreamWriter ;
2626import java .io .UnsupportedEncodingException ;
2727import java .net .HttpURLConnection ;
28+ import java .net .MalformedURLException ;
2829import java .net .URL ;
2930import java .net .URLEncoder ;
3031import java .nio .charset .StandardCharsets ;
@@ -746,10 +747,13 @@ public static WebServiceProxy get(URL url) {
746747 * @param path
747748 * The path to the resource, relative to the base URL.
748749 *
750+ * @throws MalformedURLException
751+ * If a URL cannot be constructed from the base URL and path.
752+ *
749753 * @return
750754 * The new web service proxy.
751755 */
752- public static WebServiceProxy get (URL baseURL , String path ) throws IOException {
756+ public static WebServiceProxy get (URL baseURL , String path ) throws MalformedURLException {
753757 return get (new URL (baseURL , path ));
754758 }
755759
@@ -775,10 +779,13 @@ public static WebServiceProxy post(URL url) {
775779 * @param path
776780 * The path to the resource, relative to the base URL.
777781 *
782+ * @throws MalformedURLException
783+ * If a URL cannot be constructed from the base URL and path.
784+ *
778785 * @return
779786 * The new web service proxy.
780787 */
781- public static WebServiceProxy post (URL baseURL , String path ) throws IOException {
788+ public static WebServiceProxy post (URL baseURL , String path ) throws MalformedURLException {
782789 return post (new URL (baseURL , path ));
783790 }
784791
@@ -804,10 +811,13 @@ public static WebServiceProxy put(URL url) {
804811 * @param path
805812 * The path to the resource, relative to the base URL.
806813 *
814+ * @throws MalformedURLException
815+ * If a URL cannot be constructed from the base URL and path.
816+ *
807817 * @return
808818 * The new web service proxy.
809819 */
810- public static WebServiceProxy put (URL baseURL , String path ) throws IOException {
820+ public static WebServiceProxy put (URL baseURL , String path ) throws MalformedURLException {
811821 return put (new URL (baseURL , path ));
812822 }
813823
@@ -833,10 +843,13 @@ public static WebServiceProxy delete(URL url) {
833843 * @param path
834844 * The path to the resource, relative to the base URL.
835845 *
846+ * @throws MalformedURLException
847+ * If a URL cannot be constructed from the base URL and path.
848+ *
836849 * @return
837850 * The new web service proxy.
838851 */
839- public static WebServiceProxy delete (URL baseURL , String path ) throws IOException {
852+ public static WebServiceProxy delete (URL baseURL , String path ) throws MalformedURLException {
840853 return delete (new URL (baseURL , path ));
841854 }
842855}
0 commit comments