@Test void testNewChannel() throws IOException, InvalidKeyException, NoSuchAlgorithmException, InsufficientDataException, InvalidArgumentException, InternalException, NoResponseException, InvalidBucketNameException, XmlPullParserException, ErrorResponseException { String blobId = "MyBlobId"; InputStream inputStream = mock(InputStream.class); when(minioClientFacade.getObject(blobId)).thenReturn(inputStream); assertDoesNotThrow(() -> minioBlobStore.newChannel(blobId)); }
@Override public ReadableByteChannel newChannel(String blobId) { InputStream inputStream; try { inputStream = minioClientFacade.getObject(blobId); } catch (InvalidBucketNameException | NoSuchAlgorithmException | InsufficientDataException | InvalidKeyException | NoResponseException | XmlPullParserException | ErrorResponseException | InternalException | InvalidArgumentException e) { throw new UncheckedIOException(new IOException(e)); } catch (IOException e) { throw new UncheckedIOException(e); } return Channels.newChannel(inputStream); }
MinioBlobStore implements BlobStore { @Override public ReadableByteChannel newChannel(String blobId) { InputStream inputStream; try { inputStream = minioClientFacade.getObject(blobId); } catch (InvalidBucketNameException | NoSuchAlgorithmException | InsufficientDataException | InvalidKeyException | NoResponseException | XmlPullParserException | ErrorResponseException | InternalException | InvalidArgumentException e) { throw new UncheckedIOException(new IOException(e)); } catch (IOException e) { throw new UncheckedIOException(e); } return Channels.newChannel(inputStream); } }
MinioBlobStore implements BlobStore { @Override public ReadableByteChannel newChannel(String blobId) { InputStream inputStream; try { inputStream = minioClientFacade.getObject(blobId); } catch (InvalidBucketNameException | NoSuchAlgorithmException | InsufficientDataException | InvalidKeyException | NoResponseException | XmlPullParserException | ErrorResponseException | InternalException | InvalidArgumentException e) { throw new UncheckedIOException(new IOException(e)); } catch (IOException e) { throw new UncheckedIOException(e); } return Channels.newChannel(inputStream); } MinioBlobStore(MinioClientFacade minioClientFacade, IdGenerator idGenerator); }
MinioBlobStore implements BlobStore { @Override public ReadableByteChannel newChannel(String blobId) { InputStream inputStream; try { inputStream = minioClientFacade.getObject(blobId); } catch (InvalidBucketNameException | NoSuchAlgorithmException | InsufficientDataException | InvalidKeyException | NoResponseException | XmlPullParserException | ErrorResponseException | InternalException | InvalidArgumentException e) { throw new UncheckedIOException(new IOException(e)); } catch (IOException e) { throw new UncheckedIOException(e); } return Channels.newChannel(inputStream); } MinioBlobStore(MinioClientFacade minioClientFacade, IdGenerator idGenerator); @Override BlobMetadata store(ReadableByteChannel fromChannel); @Override void delete(String blobId); @Override ReadableByteChannel newChannel(String blobId); }
MinioBlobStore implements BlobStore { @Override public ReadableByteChannel newChannel(String blobId) { InputStream inputStream; try { inputStream = minioClientFacade.getObject(blobId); } catch (InvalidBucketNameException | NoSuchAlgorithmException | InsufficientDataException | InvalidKeyException | NoResponseException | XmlPullParserException | ErrorResponseException | InternalException | InvalidArgumentException e) { throw new UncheckedIOException(new IOException(e)); } catch (IOException e) { throw new UncheckedIOException(e); } return Channels.newChannel(inputStream); } MinioBlobStore(MinioClientFacade minioClientFacade, IdGenerator idGenerator); @Override BlobMetadata store(ReadableByteChannel fromChannel); @Override void delete(String blobId); @Override ReadableByteChannel newChannel(String blobId);  }