public class AtomicObjectOutputStream extends OutputStream
LockFile
which is committed on
close(). The stream checks if the hash of the stream content matches the
id.Constructor and Description |
---|
AtomicObjectOutputStream(Path path) |
AtomicObjectOutputStream(Path path,
AnyLongObjectId id) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts the stream.
|
void |
close() |
AnyLongObjectId |
getId() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flush
public AtomicObjectOutputStream(Path path, AnyLongObjectId id) throws IOException
path
- id
- IOException
public AtomicObjectOutputStream(Path path) throws IOException
path
- IOException
@Nullable public AnyLongObjectId getId()
null
if called before closing this stream.public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void abort()
Copyright © 2018 Eclipse JGit Project. All rights reserved.