<p>init.</p>

@throws java.io.IOException if any.
975782
protected void init() throws IOException {
		if (internalIn2 != null)
			return;

		Charset preciseCharset;
		byte bom[] = new byte[BOM_SIZE];
		int n, unread;
		n = internalIn.read(bom, 0, bom.length);

		if ((bom[0] == (byte) 0x00) && (bom[1] == (byte) 0x00) && (bom[2] == (byte) 0xFE) && (bom[3] == (byte) 0xFF)) {
			preciseCharset = Charset.forName("UTF-32BE");
			unread = n - 4;
		} else if ((bom[0] == (byte) 0xFF) && (bom[1] == (byte) 0xFE) && (bom[2] == (byte) 0x00) && (bom[3] == (byte) 0x00)) {
			preciseCharset = Charset.forName("UTF-32LE");
			unread = n - 4;
		} else if ((bom[0] == (byte) 0xEF) && (bom[1] == (byte) 0xBB) && (bom[2] == (byte) 0xBF)) {
			preciseCharset = Charset.forName("UTF-8");
			unread = n - 3;
		} else if ((bom[0] == (byte) 0xFE) && (bom[1] == (byte) 0xFF)) {
			preciseCharset = Charset.forName("UTF-16BE");
			unread = n - 2;
		} else if ((bom[0] == (byte) 0xFF) && (bom[1] == (byte) 0xFE)) {
			preciseCharset = Charset.forName("UTF-16LE");
			unread = n - 2;
		} else {
			// Unicode BOM mark not found, unread all bytes
			preciseCharset = charset;
			unread = n;
		}
		if (unread > 0)
			internalIn.unread(bom, (n - unread), unread);

		// Use given encoding
		internalIn2 = preciseCharset == null ? new InputStreamReader(internalIn) : new InputStreamReader(internalIn, preciseCharset);
	}
562353
public void init(InputStream is)
    {
        _is = is;
        _method = null;
        _isLastChunk = true;
        _chunkLength = 0;
        _peek = -1;
        _refs = null;
        _replyFault = null;

        if (_serializerFactory == null)
            _serializerFactory = new SerializerFactory();
    }
325098
@Override
	public void init(File jsonFile) throws IndexerException {
		try {
			config = new JsonSimpleConfig(jsonFile);
			init();
		} catch (IOException ioe) {
			throw new IndexerException(ioe);
		}
	}
1323142
private void init()
    {
        jdbcProperties = new Properties();
        dbcpProperties = new Properties();
        setFetchSize(0);
        this.setTestOnBorrow(true);
        this.setTestOnReturn(false);
        this.setTestWhileIdle(false);
        this.setLogAbandoned(false);
        this.setRemoveAbandoned(false);
    }
24832
public void init(OutputStream os)
    {
        this.os = os;

        _refs = null;

        if (_serializerFactory == null)
            _serializerFactory = new SerializerFactory();
    }
234936
public void init(InputStream is, OutputStream os)
  {
    _is = is;
    _os = os;
    _needsFlush = false;
  }
415096
private void init(InputStream inputStream) {
        this.inputStream = inputStream;
        currentPath = new LinkedList<Node>();
        nodeQueue = new LinkedList<XmlNode>();
        XMLInputFactory factory = XMLInputFactory.newInstance();
        factory.setProperty("javax.xml.stream.isCoalescing", true);
        factory.setProperty("javax.xml.stream.isReplacingEntityReferences", true);
        try {
            reader = factory.createXMLStreamReader(inputStream);
        } catch (XMLStreamException e) {
            throw new XmlReaderException(e);
        }
    }
1351561
@Override
    public void initialize(InputSplit split) throws IOException, InterruptedException {
        super.initialize(split);
        this.iter = getIterator(0);
        this.initialized = true;
    }
963272
protected synchronized void initialize(String fileName) throws IOException, ParameterException {
		Validate.notNull(fileName, "File Name must not be null");
		input = new FileReader(fileName, inputCharset);
		String inputName = input.getFile().getAbsolutePath();
		String outputFileName = inputName.substring(0, inputName.indexOf('.'))+"_output";
		output = new FileWriter(outputFileName, outputCharset);
		if(fileExtension != null){
			output.setFileExtension(getFileExtension());
		}
	}
310635
public static void init()
  {
    try {
      initializeEnvironment();
    } catch (Throwable e) {
      log().log(Level.FINER, e.toString(), e);
    }

    try {
      init(Thread.currentThread().getContextClassLoader());
    } catch (Throwable e) {
      log().log(Level.FINER, e.toString(), e);
    }
  }
858636
public void init() throws IOException {
    if (!Files.exists(path)) {
      throw new FileNotFoundException(
          "Could not find a file under path: " + path.toAbsolutePath().toString());
    }
    if (Files.size(path) == 0) {
      throw new IllegalStateException("File size can't be zero for chunked files");
    }
    chunks = chunkFile();
    chunksInUse = new ConcurrentSkipListMap<>();
    chunksPreRead = new ConcurrentSkipListMap<>();
    chunksScheduled = new ConcurrentSkipListMap<>();
    nextChunkNum = new AtomicInteger(-1);
    if (raf != null) {
      raf.close();
    }
    execIo = MoreExecutors.listeningDecorator(Executors.newSingleThreadExecutor());
    execFinalize = Executors.newSingleThreadExecutor();
  }
1016101
@Override
  public void initialize() {
    TreeIndexHeader header = createHeader();
    if(this.file.initialize(header)) {
      initializeFromFile(header, file);
    }
    rootEntry = createRootEntry();
  }
388136
private synchronized void initQueryBuilder() throws IOException {
        if (queryBuilder == null) {
            indexReader = DirectoryReader.open(indexDirectory);
            indexSearcher = new IndexSearcher(indexReader);
            queryBuilder = new QueryBuilder(writer.getAnalyzer());
        }
    }
1098020
public void init() throws ConfigurationException {
		if(index == null) {
			throw new ConfigurationException("No index target");
		}
		if(!index.isUpdatable()) {
			throw new ConfigurationException("ResourceIndex is not updatable");
		}
		if(incoming == null) {
			throw new ConfigurationException("No incoming");			
		}
		if(runInterval > 0) {
			thread = new UpdateThread(this,runInterval);
			thread.start();
		}
	}
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");
        }
    }
467198
public static void initialize() {
		if (isInitialized) {
			return;
		}
		isInitialized = true;
		printLogo();
		try {
			logger.info("--- Para.initialize() [{}] ---", Config.ENVIRONMENT);

			for (InitializeListener initListener : INIT_LISTENERS) {
				if (initListener != null) {
					initListener.onInitialize();
					logger.debug("Executed {}.onInitialize().", initListener.getClass().getName());
				}
			}
			logger.info("Instance #{} initialized.", Config.WORKER_ID);
		} catch (Exception e) {
			logger.error("Failed to initialize Para.", e);
		}
	}
559304
public void init() {
		if (initDepth.get() == null) {
			initDepth.set(1);
		} else {
			initDepth.set(initDepth.get() + 1);
		}

		if (resourceCache.get() == null) {
			resourceCache.set(new HashMap<String, Object>());
		}

		if (cacheLocked.get() == null) {
			cacheLocked.set(Boolean.FALSE);
		}
	}