Tipo de contenido JEditorPane para imágenes Embedded Base64 HTML

Estoy usando JeditorPane y JEditorKit para mostrar algo de HTML. El HTML se muestra correctamente pero las imágenes aparecen como rotas (se muestran correctamente en un navegador). La imagen de src es base64. Establecí el tipo de contenido así:

final JEditorPane ed=new JEditorPane(); ed.setContentType("text/html"); 

Supongo que porque contiene texto e imágenes, el tipo de contenido es incorrecto. Si ese es el caso, ¿en qué debería estar configurado? TIA.

** Después de la respuesta de Madushan Perera **

 final JEditorPane ed=new JEditorPane(); ed.setContentType("text/html"); ed.setEditable(false); HTMLDocument html=(HTMLDocument) ed.getDocument(); html.putProperty("IgnoreCharsetDirective", new Boolean(true)); HTMLEditorKit htmle=(HTMLEditorKit) ed.getEditorKit(); try { htmle.insertHTML(html,html.getLength(),content,0,0,null); } catch (BadLocationException | IOException e) { // Should not get here e.printStackTrace(); } ed.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(final HyperlinkEvent pE) { if (HyperlinkEvent.EventType.ACTIVATED == pE.getEventType()) { String desc = pE.getDescription(); if (desc == null || !desc.startsWith("#")) return; desc = desc.substring(1); ed.scrollToReference(desc); } } }); ed.setCaretPosition(0); JScrollPane scroll=new JScrollPane(ed,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); JPanel jp=new JPanel(); Dimension size=new Dimension(700,700); jp.setPreferredSize(size); jp.setLayout(new BorderLayout()); jp.add(scroll); JOptionPane.showMessageDialog(null,jp,title,JOptionPane.INFORMATION_MESSAGE); 

‘html’ es la cadena que contiene el HTML. Fue leído de un tipo de archivo html usando IOUtils.toString. Probablemente tendré que desarrollar una SCCE.

Implementando CustomEditor

  final JEditorPane ed=new JEditorPane(); ed.setContentType("text/html"); ed.setEditable(false); CustomToolKit htmle=new CustomToolKit(); ed.setEditorKit(htmle); String content=readFile(fileName_+".html").replaceAll("(\\r|\\n)", ""); content=content.replace("!!!!",VERSION.VERSION); ed.setText(content); ed.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(final HyperlinkEvent pE) { if (HyperlinkEvent.EventType.ACTIVATED == pE.getEventType()) { String desc = pE.getDescription(); if (desc == null || !desc.startsWith("#")) return; desc = desc.substring(1); ed.scrollToReference(desc); } } }); ed.setCaretPosition(0); JScrollPane scroll=new JScrollPane(ed,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); JPanel jp=new JPanel(); Dimension size=new Dimension(700,700); jp.setPreferredSize(size); jp.setLayout(new BorderLayout()); jp.add(scroll); JOptionPane.showMessageDialog(null,jp,title,JOptionPane.INFORMATION_MESSAGE); } 

Ahora no consigo nada. Obviamente no implementé correctamente su sugerencia.

Puedes probar algo como a continuación:

  String imgsrc = this.getClass().getClassLoader() .getResource("your_package_name/image.png").toString(); editor_pane.setContentType("text/html"); editor_pane.setEditable(false); editor_pane.setText("

Image Title

img
");

ACTUALIZAR:

  String imgURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAACXBIWXMAAFxGAABcRgEUlENBAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJ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(encodedImg.getBytes(StandardCharsets.UTF_8)); Path destinationFile = Paths.get("C:\\your_path\\", "myImage.jpg"); try { Path path = Files.write(destinationFile, decodedImg); editor_pane.setContentType("text/html"); editor_pane.setEditable(false); editor_pane.setText("

Image Title

img_alt
"); } catch (IOException ex) { ex.printStackTrace(); }

ACTUALIZACIÓN 2:

Tienes que crear un kit de herramientas personalizado para el JEditorPane como a continuación:

 public class CustomToolKit extends HTMLEditorKit { private static HTMLFactory factory = null; @Override public ViewFactory getViewFactory() { if (factory == null) { factory = new HTMLFactory() { @Override public View create(Element elem) { AttributeSet attrs = elem.getAttributes(); Object elementName = attrs.getAttribute(AbstractDocument.ElementNameAttribute); Object o = (elementName != null) ? null : attrs.getAttribute(StyleConstants.NameAttribute); if (o instanceof HTML.Tag) { HTML.Tag kind = (HTML.Tag) o; if (kind == HTML.Tag.IMG) { return new BASE64ImageView(elem); } } return super.create(elem); } }; } return factory; } } 

Luego debe anular getImageURL() de javax.swing.text.html.ImageView para admitir imágenes codificadas en Base64.

 public class BASE64ImageView extends ImageView { private URL url; public BASE64ImageView(Element elmnt) { super(elmnt); populateImage(); } private void populateImage() { Dictionary cache = (Dictionary) getDocument() .getProperty("imageCache"); if (cache == null) { cache = new Hashtable<>(); getDocument().putProperty("imageCache", cache); } URL src = getImageURL(); cache.put(src, loadImage()); } private Image loadImage() { String b64 = getBASE64Image(); BufferedImage newImage = null; ByteArrayInputStream bais = null; try { bais = new ByteArrayInputStream( Base64.getDecoder().decode(b64.getBytes())); newImage = ImageIO.read(bais); } catch (Throwable ex) { ex.printStackTrace(); } return newImage; } @Override public URL getImageURL() { String src = (String) getElement().getAttributes() .getAttribute(HTML.Attribute.SRC); if (isBase64Encoded(src)) { this.url = BASE64ImageView.class.getProtectionDomain() .getCodeSource().getLocation(); return this.url; } return super.getImageURL(); } private boolean isBase64Encoded(String src) { return src != null && src.contains("base64,"); } private String getBASE64Image() { String src = (String) getElement().getAttributes() .getAttribute(HTML.Attribute.SRC); if (!isBase64Encoded(src)) { return null; } return src.substring(src.indexOf("base64,") + 7, src.length() - 1); } } 

Finalmente puede configurar CustomTollKit en su editorPane :

  String imgURL = "data:image/png;base64,iVBORw0KGgoAA........."; editor_pane.setContentType("text/html"); editor_pane.setEditable(false); CustomToolKit tooKit = new CustomToolKit(); editor_pane.setEditorKit(tooKit); editor_pane.setText("

Image Title

img_alt
");