01: package org.jvnet.mimepull;
02:
03: import java.nio.ByteBuffer;
04:
05: /**
06: * @author Kohsuke Kawaguchi
07: */
08: final class Chunk {
09: volatile Chunk next;
10: volatile Data data;
11:
12: public Chunk(Data data) {
13: this .data = data;
14: }
15:
16: /**
17: * Creates a new chunk and adds to linked list.
18: *
19: * @param dataHead of the linked list
20: * @param buf MIME part partial data
21: * @return created chunk
22: */
23: public Chunk createNext(DataHead dataHead, ByteBuffer buf) {
24: return next = new Chunk(data.createNext(dataHead, buf));
25: }
26: }
|