w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Java IO Exception: stream closed when writing from AudioInputStream to a file

SequenceInputStream doesn't copy yours streams in memory, it's just remembers links... here is code of read method

public int read() throws IOException
  int ch = -1;

  while (in != null && (ch = in.read()) < 0)
      in = getNextStream();

  return ch;

so if you will close one of streams added to SequenceInputStream - you will get exception

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.