ByteArrayInputStream to FileInputStream without writing the file to hard drive
问题 I read a file from the database that is in a byte[] array, using the ByteArrayInputStream . InputStream input = new ByteArrayInputStream(lc.getTable()); For a further processing of the file I need a FileInputStream . But I don't want to save the file on the hard disk first to read it again. Can this be done or does the file have to be written out first? 回答1: Not really. Then the further processing is overspecified; it should only require an InputStream. One could create a temporary deleted-on