public synchronized InputStream acquire ( final DataSource source ) throws DataSourceException { InputStream ret ; if ( data == null ) { if ( getReference ( ) == null ) { throw new IllegalStateException ( "No data or reference present" ) ; } else { ret = source . getStream ( getReference ( ) ) ; } } else { ret = new ByteArrayInputStream ( data ) ; } return ret ; }
Return the referenced data as a stream potentially performing a remote lookup .