public String readXlinkContent ( ) throws java . io . IOException { if ( uri == null ) return "" ; URL url = uri . toURL ( ) ; InputStream is = url . openStream ( ) ; ByteArrayOutputStream os = new ByteArrayOutputStream ( is . available ( ) ) ; // copy to string byte [ ] buffer = new byte [ 1024 ] ; while ( true ) { int bytesRead = is . read ( buffer ) ; if ( bytesRead == - 1 ) break ; os . write ( buffer , 0 , bytesRead ) ; } is . close ( ) ; return new String ( os . toByteArray ( ) , CDM . utf8Charset ) ; }
Get inline content as a string else null if there is none