@Test public void testGetContentType() throws MalformedURLException { Handler.configureProtocolHandler(); assertEquals("image/svg+xml", new DataUrlConnection(new URL("data:image/svg+xml;base64,PHN2")).getContentType()); assertEquals("image/svg+xml", new DataUrlConnection(new URL("data:image/svg+xml,PHN2")).getContentType()); assertEquals("text/plain;charset=US-ASCII", new DataUrlConnection(new URL("data:,PHN2")).getContentType()); }
@Override public String getContentType() { return getFullContentType().replace(";base64", ""); }
DataUrlConnection extends URLConnection { @Override public String getContentType() { return getFullContentType().replace(";base64", ""); } }
DataUrlConnection extends URLConnection { @Override public String getContentType() { return getFullContentType().replace(";base64", ""); } DataUrlConnection(final URL url); }
DataUrlConnection extends URLConnection { @Override public String getContentType() { return getFullContentType().replace(";base64", ""); } DataUrlConnection(final URL url); @Override void connect(); @Override InputStream getInputStream(); @Override String getContentType(); String getFullContentType(); }
DataUrlConnection extends URLConnection { @Override public String getContentType() { return getFullContentType().replace(";base64", ""); } DataUrlConnection(final URL url); @Override void connect(); @Override InputStream getInputStream(); @Override String getContentType(); String getFullContentType();  }