Project

General

Profile

Statistics
| Revision:

root / proj / src / Chunk.java @ 1

History | View | Annotate | Download (705 Bytes)

1
public class Chunk{
2
        private String chunkID;
3
        private String fileID;
4
        private byte[] content;
5
        private int chunkN;
6
        private int size; 
7

    
8
        public static int chunkMaxSize = 64000;
9
        
10

    
11

    
12

    
13
 
14
                public Chunk(String fileID, int chunkn, byte[] content) {
15
                        this.chunkN = chunkn;
16
                        this.fileID = fileID;
17
                        this.content = content;
18
                        this.size = content.length;
19
                        this.chunkID=fileID + "chunk" + chunkn;
20
                
21
                }
22

    
23
                
24
                public String getChunkId() {
25
                        return this.chunkID;
26
                }
27
                
28
                public int getChunkN() {
29
                        return this.chunkN;
30
                }
31
                
32
                public String getFileID() {
33
                        return this.fileID;
34
                }
35
                
36
                public byte[] getContent() {
37
                        return this.content;
38
                }
39
                
40
                public int getsize() {
41
                        return this.size;
42
                }
43
                
44
        
45
        }