| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | public class ReplLDIFOutputStream |
| | | extends OutputStream |
| | | { |
| | | // The number of entries to be exported |
| | | /** The number of entries to be exported. */ |
| | | long numEntries; |
| | | |
| | | // The current number of entries exported |
| | | /** The current number of entries exported. */ |
| | | private long numExportedEntries; |
| | | String entryBuffer = ""; |
| | | |
| | | // The checksum for computing the generation id |
| | | /** The checksum for computing the generation id. */ |
| | | private GenerationIdChecksum checkSum = new GenerationIdChecksum(); |
| | | |
| | | /** |
| | |
| | | this.numEntries = numEntries; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void write(int i) throws IOException |
| | | { |
| | | throw new IOException("Invalid call"); |
| | |
| | | return checkSum.getValue(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void write(byte b[], int off, int len) throws IOException |
| | | { |
| | | int endOfEntryIndex; |