class S3Service extends AbstractIFileService {
    @Resource
    private S3Template s3Template;

    @Override
    protected String fileType() {
        return FileServerProperties.TYPE_S3;
    }

    @Override
    protected ObjectInfo uploadFile(MultipartFile file) {
        return s3Template.upload(file);
    }

    @Override
    protected void deleteFile(String objectPath) {
        S3Object s3Object = parsePath(objectPath);
        s3Template.delete(s3Object.bucketName, s3Object.objectName);
    }

    @Override
    public void out(String id, OutputStream os) {<FILL_FUNCTION_BODY>}

    @Setter
    @Getter
    private class S3Object {
        private String bucketName;
        private String objectName;
    }

    private S3Object parsePath(String path) {
        S3Object s3Object = new S3Object();
        if (StrUtil.isNotEmpty(path)) {
            int splitIndex = path.lastIndexOf(CommonConstant.PATH_SPLIT);
            if (splitIndex != -1) {
                s3Object.bucketName = path.substring(0, splitIndex);
                s3Object.objectName = path.substring(splitIndex + 1);
            }
        }
        return s3Object;
    }
}

        FileInfo fileInfo = baseMapper.selectById(id);
        if (fileInfo != null) {
            S3Object s3Object = parsePath(fileInfo.getPath());
            s3Template.out(s3Object.bucketName, s3Object.objectName, os);
        }
    
<methods>public non-sealed void <init>() ,public void delete(java.lang.String) ,public PageResult<com.central.file.model.FileInfo> findList(Map<java.lang.String,java.lang.Object>) ,public com.central.file.model.FileInfo upload(org.springframework.web.multipart.MultipartFile) <variables>private static final java.lang.String FILE_SPLIT