package com.atlassian.bitbucket.mesh.git;

import com.atlassian.bitbucket.mesh.git.exception.LfsStorageException;

import javax.annotation.Nonnull;
import java.nio.ByteBuffer;

/**
 * Used for writing LFS objects to the filesystem.
 */
public interface LfsObjectWriter {

    void abort();

    void close();

    /**
     * @param buffer the buffer to write
     * @throws LfsStorageException if an I/O error occurs while writing to LFS storage
     */
    void write(@Nonnull ByteBuffer buffer);
}
