Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2011 Ursa Project LLC ( Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
HFS client-based storage to persist binary content.
public class HfsDefaultStorage implements HfsStorage {
HFS client name to work with.
    private final String clientName;

Constructs content storage.

clientName HFS client name to work with.
    public HfsDefaultStorage(String clientName) {
        this. = clientName;
    public InputStream read(UUID fileIdthrows IOException {
        return new URL(getClient().createPublishUri(fileIdnull)).openStream();
    public UUID write(Consumer<OutputStreamIOExceptionwriterthrows IOException {
        throw new UnsupportedOperationException("Direct upload operation is not supported.");

Return a HFS client this storage works with.

HFS client instance.
    protected HfsClient getClient() {
        return HfsFactory.getClient();
New to GrepCode? Check out our FAQ X