private void uploadThumbImage(StorageNode client, InputStream inputStream, String masterFilename,
                                  String fileExtName) {
        ByteArrayInputStream thumbImageStream = null;
        try {
            thumbImageStream = generateThumbImageByDefault(inputStream);// getFileInputStream
            // 获取文件大小
            long fileSize = thumbImageStream.available();
            // 获取缩略图前缀
            String prefixName = thumbImageConfig.getPrefixName();
            LOGGER.debug("上传缩略图主文件={},前缀={}", masterFilename, prefixName);
            StorageUploadSlaveFileCommand command = new StorageUploadSlaveFileCommand(thumbImageStream, fileSize,
                    masterFilename, prefixName, fileExtName);
            connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command);

        } catch (IOException e) {
            LOGGER.error("upload ThumbImage error", e);
            throw new FdfsUploadImageException("upload ThumbImage error", e.getCause());
        } finally {
            IOUtils.closeQuietly(thumbImageStream);
        }
    }
private void uploadThumbImage ( StorageNode client , InputStream inputStream , String masterFilename , String fileExtName ) { ByteArrayInputStream thumbImageStream = null ; try { thumbImageStream = generateThumbImageByDefault ( inputStream ) ; long fileSize = thumbImageStream . available ( ) ; String prefixName = thumbImageConfig . getPrefixName ( ) ; LOGGER . debug ( "上传缩略图主文件={},前缀={}" , masterFilename , prefixName ) ; StorageUploadSlaveFileCommand command = new StorageUploadSlaveFileCommand ( thumbImageStream , fileSize , masterFilename , prefixName , fileExtName ) ; connectionManager . executeFdfsCmd ( client . getInetSocketAddress ( ) , command ) ; } catch ( IOException e ) { LOGGER . error ( "upload ThumbImage error" , e ) ; throw new FdfsUploadImageException ( "upload ThumbImage error" , e . getCause ( ) ) ; } finally { IOUtils . closeQuietly ( thumbImageStream ) ; } }
上传缩略图

@param client
@param inputStream
@param masterFilename
@param fileExtName