<commit_before>package com.parc.ccn.library.io;

import java.io.IOException;
import java.io.OutputStream;

import com.parc.ccn.data.ContentName;
import com.parc.ccn.data.security.KeyLocator;
import com.parc.ccn.data.security.PublisherPublicKeyDigest;
import com.parc.ccn.library.CCNLibrary;
import com.parc.ccn.library.CCNSegmenter;

public abstract class CCNAbstractOutputStream extends OutputStream {

	protected CCNLibrary _library = null;
	protected CCNSegmenter _segmenter = null;
	/** 
	 * The name for the content fragments, up to just before the sequence number.
	 */
	protected ContentName _baseName = null;
	protected int _blockIndex = 0;
	protected KeyLocator _locator;
	protected PublisherPublicKeyDigest _publisher;

	/**
	 * The behavior of an output stream derived class is determined
	 * largely by its buffering, segmentation configuration (embodied
	 * in a CCNSegmenter) and flow control (embodied in a CCNFlowControl,
	 * contained within the segmenter).
	 * @param locator
	 * @param publisher
	 * @param segmenter
	 */
	public CCNAbstractOutputStream(KeyLocator locator, 
								   PublisherPublicKeyDigest publisher,
								   CCNSegmenter segmenter) {
		super();
		_segmenter = segmenter;
		_library = _segmenter.getLibrary();
		if (null == _library) {
			_library = CCNLibrary.getLibrary();
		}

		// If these are null, the library defaults will be used.
		_locator = locator;
		_publisher = publisher;		
	}

	@Override
	public void write(byte[] b) throws IOException {<commit_msg>Removed blockIndex.<commit_after>package com.parc.ccn.library.io;

import java.io.IOException;
import java.io.OutputStream;

import com.parc.ccn.data.ContentName;
import com.parc.ccn.data.security.KeyLocator;
import com.parc.ccn.data.security.PublisherPublicKeyDigest;
import com.parc.ccn.library.CCNLibrary;
import com.parc.ccn.library.CCNSegmenter;

public abstract class CCNAbstractOutputStream extends OutputStream {

	protected CCNLibrary _library = null;
	protected CCNSegmenter _segmenter = null;
	/** 
	 * The name for the content fragments, up to just before the sequence number.
	 */
	protected ContentName _baseName = null;
	protected KeyLocator _locator;
	protected PublisherPublicKeyDigest _publisher;

	/**
	 * The behavior of an output stream derived class is determined
	 * largely by its buffering, segmentation configuration (embodied
	 * in a CCNSegmenter) and flow control (embodied in a CCNFlowControl,
	 * contained within the segmenter).
	 * @param locator
	 * @param publisher
	 * @param segmenter
	 */
	public CCNAbstractOutputStream(KeyLocator locator, 
								   PublisherPublicKeyDigest publisher,
								   CCNSegmenter segmenter) {
		super();
		_segmenter = segmenter;
		_library = _segmenter.getLibrary();
		if (null == _library) {
			_library = CCNLibrary.getLibrary();
		}

		// If these are null, the library defaults will be used.
		_locator = locator;
		_publisher = publisher;		
	}

	@Override
	public void write(byte[] b) throws IOException {
{'fraction_non_alphanumeric': 0.08193979933110368, 'fraction_numerical': 0.00033444816053511704, 'mean_word_length': 4.275132275132275, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3520829', 'n_tokens_mistral': 987, 'n_tokens_neox': 893, 'n_words': 261}