{@inheritdoc}

@throws IOException
488791
public function write(OutputInterface $output): void
    {
        $outputPath = $this->outputDir.'/'.$output->permalink()->relativeFilePath();
        if ($output->hasFileReference()) {
            $this->filesystem->copy($output->file(), $outputPath, true);
        } else {
            $this->filesystem->mkdir(dirname($outputPath));
            $this->filesystem->dumpFile($outputPath, $output->formattedContent());
        }
    }
1171711
@Override
    public void write(int value) throws IOException {
        validate();
        byte[] buf = new byte[1];
        buf[0] = (byte) value;
        writeToBuffers(buf, 0, 1);

    }
263505
private void readObject (ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        in.defaultReadObject();
        createBuckets(getBucketCount(_size));
        for (int ii = 0; ii < _size; ii++) {
            readd(in.readInt());
        }
    }
39637
@Override
    public int read() throws IOException {
        int c = origStream.read();
        if (c != -1) {
            os.write(c);
        } else {
            os.close();
        }
        return c;
    }
564692
protected void initCheck() throws IOException {
    // Check storage version
    if (_version != STORAGE_VERSION) {
      throw new IOException("Invalid version in " + _file.getName() + ": "
              + _version + ", " + STORAGE_VERSION + " expected");
    }
    
    // Check array file header
    if(!checkHeader()) {
      throw new IOException("Invalid header in " + _file.getName() + ": " + getHeader());
    }
  }
660536
private void loadFrom(final InputStream inputStream) throws IOException {
    final Properties properties = new Properties();
    properties.load(inputStream);
    this.put(properties);
  }
398248
private void readInterfaces() throws IOException {
        // Interfaces
        final int interfaceCount = inputStreamOrByteBuffer.readUnsignedShort();
        for (int i = 0; i < interfaceCount; i++) {
            final String interfaceName = getConstantPoolClassName(inputStreamOrByteBuffer.readUnsignedShort());
            if (implementedInterfaces == null) {
                implementedInterfaces = new ArrayList<>();
            }
            implementedInterfaces.add(interfaceName);
        }
    }
1159127
public static void print(Object o) throws IOException {
		OutputStreamWriter w=new OutputStreamWriter(System.out,"UTF-8");
		print(o, w, true);
		w.flush();
	}
309762
@SuppressWarnings({"resource", "checkstyle:magicnumber"})
	protected void readHeader() throws IOException {
		final ReadableByteChannel in = Channels.newChannel(this.input);
		final int limit = HEADER_KEY.getBytes().length + 2;
		final ByteBuffer hBuffer = ByteBuffer.allocate(limit);
		hBuffer.limit(limit);

		// Check the header
		final byte[] key = GISLayerIOConstants.HEADER_KEY.getBytes();
		final int n = in.read(hBuffer);
		if (n != limit) {
			throw new IOException("Invalid file header"); //$NON-NLS-1$
		}
		for (int i = 0; i < key.length; ++i) {
			if (hBuffer.get(i) != key[i]) {
				throw new IOException("Invalid file header"); //$NON-NLS-1$
			}
		}
		// Check the format version
		final byte major = hBuffer.get(key.length);
		final byte minor = hBuffer.get(key.length + 1);
		if (major != GISLayerIOConstants.MAJOR_SPEC_NUMBER || minor != GISLayerIOConstants.MINOR_SPEC_NUMBER) {
			throw new IOException("Invalid file format version."); //$NON-NLS-1$
		}
		// Read the number of objects inside the input stream
		final ByteBuffer sBuffer = ByteBuffer.allocate(4);
		sBuffer.limit(4);
		in.read(sBuffer);
		sBuffer.rewind();
		this.restToRead = sBuffer.getInt();
	}
995694
public void save() throws IOException {
        JFileChooser fc = FileChooser.getInstance();
        fc.setFileFilter(FileChooser.SimpleFileFilter.getWritableImageFIlter());
        fc.setAcceptAllFileFilterUsed(false);
        fc.setSelectedFiles(new File[0]);
        int returnVal = fc.showSaveDialog(this);

        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = fc.getSelectedFile();
            save(file);
        }        
    }
1207837
public void setData(final InputStream in) throws IOException {
		final byte[] bytes = JKIOUtil.readStream(in);
		setData(bytes);
	}
1045586
public function setIO(IOInterface $io)
    {
        $this->io = $io;
        $this->verbose = $io->isVerbose();
    }
1245855
protected void loadDataFromFile(InputStream is) throws IOException {
		PHPFileParser fp = new PHPFileParser(is);
		createInternalDataStructre(fp.getSections());
	}
534910
public void open() throws IOException {
        mConnection.connect();
        mContentType = mConnection.getContentType();
        mResponseCode = mConnection.getResponseCode();
        mContentEncoding = mConnection.getContentEncoding();
    }
600393
public void sendFile(File file, OutputStream os) throws IOException {
        FileInputStream is = null;
        BufferedInputStream buf = null;;
        try {
            is = new FileInputStream(file);
            buf = new BufferedInputStream(is);
            int readBytes = 0;
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("Writing file...");
            }
            while ((readBytes = buf.read()) != -1) {
                os.write(readBytes);
            }
            os.flush();
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("File written");
            }
        } finally {
            if (is != null) {
                is.close();
            }
            if (buf != null) {
                buf.close();
            }
        }
    }
192434
public static void copyStream(InputStream copyFrom, OutputStream copyTo)
			throws IOException {
		copyStream(copyFrom, copyTo, null);
	}
503861
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        try {
            $this->doExecute($input, $output);
        } catch (\Exception $e) {
            $this->writeException($e);
        }
    }