Lecture du counter depuis son fichier.
@throws IOException e
9733
void readFromFile() throws IOException {
		final Counter counter = new CounterStorage(this).readFromFile();
		if (counter != null) {
			final Counter newCounter = clone();
			startDate = counter.getStartDate();
			requests.clear();
			for (final CounterRequest request : counter.getRequests()) {
				requests.put(request.getName(), request);
			}
			if (errors != null) {
				errors.clear();
				errors.addAll(counter.getErrors());
			}
			// on ajoute les nouvelles requêtes enregistrées avant de lire le fichier
			// (par ex. les premières requêtes collectées par le serveur de collecte lors de l'initialisation)
			addRequestsAndErrors(newCounter);
		}
	}
975917
public static int countLines(String filename) throws IOException {
        FileInputStream fis = new FileInputStream(filename);
        try {
            return countLines(new BufferedInputStream(fis));
        } finally {
            fis.close();
        }
    }
1161282
private void record(int b) throws IOException {
        if (this.shouldDigest) {
            this.digest.update((byte)b);
        }
        if (this.position >= this.buffer.length) {
            this.ensureDiskStream().write(b);
        } else {
            this.buffer[(int) this.position] = (byte) b;
        }
        this.position++;
    }
1049747
public void reader() throws IOException {
    // [START reader]
    try (ReadChannel reader = blob.reader()) {
      ByteBuffer bytes = ByteBuffer.allocate(64 * 1024);
      while (reader.read(bytes) > 0) {
        bytes.flip();
        // do something with bytes
        bytes.clear();
      }
    }
    // [END reader]
  }
137391
public synchronized void enqueue(final T o) throws IOException {
		assert o != null;
		fbaos.reset();
		BinIO.storeObject(o, fbaos);
		byteDiskQueue.enqueueInt(fbaos.length);
		byteDiskQueue.enqueue(fbaos.array, 0, fbaos.length);
		size++;
	}
180101
protected void check(File file) throws IOException {
        if(!file.exists()) {
            throw new FileNotFoundException(file.getAbsolutePath());
        }
        
        if(file.isDirectory()) {
            throw new IOException("Cannot open directory " + file.getAbsolutePath());
        }
    }
147139
static void incrementCounter(byte[] counter, byte[] oldCounter) throws GeneralSecurityException {
    System.arraycopy(counter, 0, oldCounter, 0, counter.length);
    int i = 0;
    for (; i < COUNTER_OVERFLOW_LENGTH; i++) {
      counter[i]++;
      if (counter[i] != (byte) 0x00) {
        break;
      }
    }

    if (i == COUNTER_OVERFLOW_LENGTH) {
      // Restore old counter value to ensure that encrypt and decrypt keep failing.
      System.arraycopy(oldCounter, 0, counter, 0, counter.length);
      throw new GeneralSecurityException("Counter has overflowed.");
    }
  }
188629
public void executeInstrumentation() throws IOException {
        errors.clear();

        // Iterate over all entries in the classes list
        for (File f : this.classFiles) {
            try {
                if (!f.canRead() || !f.canWrite()) {
                    throw new IOException(f + " can not be replaced");
                }
                instrumentClassFile(f);
            } catch (Exception e) {
                e.printStackTrace();
                errors.add(e);
            }
        }

        // Iterate over all entries in the jar list
        for (File f : this.jarFiles) {
            try {
                instrumentZipFile(f);
            } catch (Exception e) {
                e.printStackTrace();
                errors.add(e);
            }
        }

        // Chain the first exception and report the error count
        if (!errors.isEmpty()) {
            Throwable t = errors.get(0);
            IOException ioe = new IOException(errors.size() + " errors occurred");
            ioe.initCause(t);
            throw ioe;
        }
    }
292312
public void execute() throws IOException {
        if (sequential == null) {
            throw new IllegalArgumentException("Sequential element is missing");
        }
        builder.withInputs(inputStreams);
        if (filters != null) {
            builder.withInputFilters(filters.toFilter());
        }
        expect = builder.build();
        sequential.setExpect(expect);
        sequential.perform();
    }
327493
private Counter getDayCounterAtDate(Date day) {
		final Counter dayCounter = createDayCounterAtDate(day);
		try {
			dayCounter.readFromFile();
		} catch (final IOException e) {
			// lecture échouée, tant pis
			// (on n'interrompt pas tout un rapport juste pour un des fichiers illisible)
			LOG.info("read of a counter file failed: " + dayCounter.getName(), e);
		}
		return dayCounter;
	}
127691
private void init() throws IOException {
        if (initialized.compareAndSet(false, true)) {
            log.debug("Init: {}", mode);
            // if the path is null, the consumer has been uninitialized
            if (path != null) {
                if (log.isDebugEnabled()) {
                    Path parent = path.getParent();
                    log.debug("Parent abs: {} dir: {}", parent.isAbsolute(), Files.isDirectory(parent));
                }
                if (IClientStream.MODE_APPEND.equals(mode)) {
                    if (Files.notExists(path)) {
                        throw new IOException("File to be appended doesnt exist, verify the record mode");
                    }
                    log.debug("Path: {}\nRead: {} write: {} size: {}", path, Files.isReadable(path), Files.isWritable(path), Files.size(path));
                    writer = new FLVWriter(path, true);
                } else if (IClientStream.MODE_RECORD.equals(mode)) {
                    try {
                        // delete existing file
                        if (Files.deleteIfExists(path)) {
                            log.debug("File deleted");
                        }
                        // ensure parent dirs exist
                        Files.createDirectories(path.getParent());
                        // create the file
                        path = Files.createFile(path);
                    } catch (IOException ioe) {
                        log.error("File creation error: {}", ioe);
                    }
                    if (!Files.isWritable(path)) {
                        throw new IOException("File is not writable");
                    }
                    log.debug("Path: {}\nRead: {} write: {}", path, Files.isReadable(path), Files.isWritable(path));
                    writer = new FLVWriter(path, false);
                } else {
                    try {
                        // delete existing file since we're not recording nor appending
                        if (Files.deleteIfExists(path)) {
                            log.debug("File deleted");
                        }
                    } catch (IOException ioe) {
                        log.error("File creation error: {}", ioe);
                    }
                }
            } else {
                log.warn("Consumer is uninitialized");
            }
            log.debug("Init - complete");
        }
    }
554903
private void init() throws IOException {
    // move to begin
    IndexInput inField = indexInputList.get("field");
    inField.seek(indexInputOffsetList.get("field"));
    // store field references in memory
    fieldReferences = new HashMap<String, FieldReferences>();
    boolean doInit = true;
    while (doInit) {
      try {
        String field = inField.readString();
        long refIndexDoc = inField.readVLong();
        long refIndexDocId = inField.readVLong();
        int numberOfDocs = inField.readVInt();
        inField.readVLong(); // refTerm
        inField.readVInt(); // numberOfTerms
        long refPrefix = inField.readVLong();
        int numberOfPrefixes = inField.readVInt();
        fieldReferences.put(field, new FieldReferences(refIndexDoc,
            refIndexDocId, numberOfDocs, refPrefix, numberOfPrefixes));
      } catch (IOException e) {
        log.debug(e);
        doInit = false;
      }
    }
    // prefixReferences
    prefixReferences = new HashMap<String, LinkedHashMap<String, Long>>();
  }
150262
void writeToFile() throws IOException {
		// on clone le counter avant de le sérialiser pour ne pas avoir de problèmes de concurrences d'accès
		final Counter counter = this.clone();
		// on n'écrit pas rootCurrentContextsByThreadId en fichier
		// puisque ces données ne seront plus vraies dans quelques secondes (clear pour être sûr ici)
		counter.rootCurrentContextsByThreadId.clear();
		estimatedMemorySize = new CounterStorage(counter).writeToFile();
	}
1208530
public void writeIfds() throws IOException {
    IFD first = model.getFirstIFD();
    IFD current = first;

    if (current != null) {
      // First IFD offset
      data.putInt((int) data.position() + 4);
    }

    while (current != null) {
      writeIFD(current);
      current = current.getNextIFD();
    }
  }
749082
public void list() throws IOException {
        this.writer.println("+OK");
        this.writer.println("1 " + msg1.length());
        this.writer.println("2 " + msg2.length());
        this.println(".");
    }
18060
public void listContents() throws IOException {
        for (;;) {
            TarEntry entry = this.tarIn.getNextEntry();

            if (entry == null) {
                if (this.debug) {
                    System.err.println("READ EOF RECORD");
                }
                break;
            }

            if (this.progressDisplay != null) {
                this.progressDisplay.showTarProgressMessage(entry.getName());
            }
        }
    }
960947
protected void init(InputStream inputStream) throws IOException {
		stream = inputStream;
		st = new StreamTokenizer(new BufferedReader(new InputStreamReader(
				stream, ENCODING)));

		EOF_reached = false;
		skipStatements();

	}