BlobOutputStream(JobID jobID, BlobKey.BlobType blobType, Socket socket) throws IOException { this.blobType = blobType; if (socket.isClosed()) { throw new IllegalStateException("BLOB Client is not connected. " + "Client has been shut down or encountered an error before."); } this.socket = socket; this.socketStream = socket.getOutputStream(); this.md = BlobUtils.createMessageDigest(); sendPutHeader(socketStream, jobID, blobType); }
BlobOutputStream(JobID jobID, BlobKey.BlobType blobType, Socket socket) throws IOException { this.blobType = blobType; if (socket.isClosed()) { throw new IllegalStateException("BLOB Client is not connected. " + "Client has been shut down or encountered an error before."); } this.socket = socket; this.socketStream = socket.getOutputStream(); this.md = BlobUtils.createMessageDigest(); sendPutHeader(socketStream, jobID, blobType); }
BlobOutputStream(JobID jobID, BlobKey.BlobType blobType, Socket socket) throws IOException { this.blobType = blobType; if (socket.isClosed()) { throw new IllegalStateException("BLOB Client is not connected. " + "Client has been shut down or encountered an error before."); } this.socket = socket; this.socketStream = socket.getOutputStream(); this.md = BlobUtils.createMessageDigest(); sendPutHeader(socketStream, jobID, blobType); }
/** * Constructs a new BLOB input stream. * * @param wrappedInputStream * the underlying input stream to read from * @param blobKey * the expected BLOB key for content-addressable BLOBs, <code>null</code> for non-content-addressable BLOBs. * @throws IOException * throws if an I/O error occurs while reading the BLOB data from the BLOB server */ BlobInputStream(final InputStream wrappedInputStream, final BlobKey blobKey) throws IOException { this.wrappedInputStream = wrappedInputStream; this.blobKey = blobKey; this.bytesToReceive = readLength(wrappedInputStream); if (this.bytesToReceive < 0) { throw new FileNotFoundException(); } this.md = (blobKey != null) ? BlobUtils.createMessageDigest() : null; }
/** * Constructs a new BLOB input stream. * * @param wrappedInputStream * the underlying input stream to read from * @param blobKey * the expected BLOB key for content-addressable BLOBs, <code>null</code> for non-content-addressable BLOBs. * @param wrappedOutputStream * the underlying output stream to write the result to * * @throws IOException * throws if an I/O error occurs while reading the BLOB data from the BLOB server */ BlobInputStream( final InputStream wrappedInputStream, final BlobKey blobKey, OutputStream wrappedOutputStream) throws IOException { this.wrappedInputStream = wrappedInputStream; this.blobKey = blobKey; this.wrappedOutputStream = wrappedOutputStream; this.bytesToReceive = readLength(wrappedInputStream); if (this.bytesToReceive < 0) { throw new FileNotFoundException(); } this.md = (blobKey != null) ? BlobUtils.createMessageDigest() : null; }
/** * Constructs a new BLOB input stream. * * @param wrappedInputStream * the underlying input stream to read from * @param blobKey * the expected BLOB key for content-addressable BLOBs, <code>null</code> for non-content-addressable BLOBs. * @param wrappedOutputStream * the underlying output stream to write the result to * * @throws IOException * throws if an I/O error occurs while reading the BLOB data from the BLOB server */ BlobInputStream( final InputStream wrappedInputStream, final BlobKey blobKey, OutputStream wrappedOutputStream) throws IOException { this.wrappedInputStream = wrappedInputStream; this.blobKey = blobKey; this.wrappedOutputStream = wrappedOutputStream; this.bytesToReceive = readLength(wrappedInputStream); if (this.bytesToReceive < 0) { throw new FileNotFoundException(); } this.md = (blobKey != null) ? BlobUtils.createMessageDigest() : null; }
/** * Constructs a new BLOB input stream. * * @param wrappedInputStream * the underlying input stream to read from * @param blobKey * the expected BLOB key for content-addressable BLOBs, <code>null</code> for non-content-addressable BLOBs. * @param wrappedOutputStream * the underlying output stream to write the result to * * @throws IOException * throws if an I/O error occurs while reading the BLOB data from the BLOB server */ BlobInputStream( final InputStream wrappedInputStream, final BlobKey blobKey, OutputStream wrappedOutputStream) throws IOException { this.wrappedInputStream = wrappedInputStream; this.blobKey = blobKey; this.wrappedOutputStream = wrappedOutputStream; this.bytesToReceive = readLength(wrappedInputStream); if (this.bytesToReceive < 0) { throw new FileNotFoundException(); } this.md = (blobKey != null) ? BlobUtils.createMessageDigest() : null; }
final InputStream inputStream, final File incomingFile, final byte[] buf) throws IOException { MessageDigest md = BlobUtils.createMessageDigest();
MessageDigest md = BlobUtils.createMessageDigest(); BlobKey blobKey = null; try (FileOutputStream fos = new FileOutputStream(incomingFile)) {
MessageDigest md = BlobUtils.createMessageDigest(); BlobKey blobKey = null; try (FileOutputStream fos = new FileOutputStream(incomingFile)) {
MessageDigest md = BlobUtils.createMessageDigest(); BlobKey blobKey = null; try (FileOutputStream fos = new FileOutputStream(incomingFile)) {
final InputStream inputStream, final File incomingFile, final byte[] buf) throws IOException { MessageDigest md = BlobUtils.createMessageDigest();
final InputStream inputStream, final File incomingFile, final byte[] buf) throws IOException { MessageDigest md = BlobUtils.createMessageDigest();
MessageDigest md = BlobUtils.createMessageDigest(); BlobKey blobKey = null; try (FileOutputStream fos = new FileOutputStream(incomingFile)) {
MessageDigest md = BlobUtils.createMessageDigest(); BlobKey blobKey = null; try (FileOutputStream fos = new FileOutputStream(incomingFile)) {
MessageDigest md = BlobUtils.createMessageDigest(); BlobKey blobKey = null; try (FileOutputStream fos = new FileOutputStream(incomingFile)) {
MessageDigest md = BlobUtils.createMessageDigest();
final MessageDigest md = jobId == null ? BlobUtils.createMessageDigest() : null;
MessageDigest md = BlobUtils.createMessageDigest();
MessageDigest md = BlobUtils.createMessageDigest();