DfsFile.java
961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.diligrp.assistant.dfs.domain;
import com.diligrp.assistant.shared.util.RandomUtils;
import java.io.InputStream;
public class DfsFile {
// 文件唯一标识
private String id;
// 文件名称
private String name;
// 文件流
private InputStream stream;
// option参数
private FileMetadata metadata;
public DfsFile(String name, InputStream stream, FileMetadata metadata) {
this(RandomUtils.randomUUID(false), name, stream, metadata);
}
public DfsFile(String id, String name, InputStream stream, FileMetadata metadata) {
this.id = id;
this.name = name;
this.stream = stream;
this.metadata = metadata;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
public InputStream getStream() {
return stream;
}
public FileMetadata getMetadata() {
return metadata;
}
}