|
| Object | encode (ChannelHandlerContext ctx, Channel c, Object msg) throws Exception |
Definition at line 11 of file ServiceResponseEncoder.java.
◆ encode()
| Object dev.advo.fs.net.service.ServiceResponseEncoder.encode |
( |
ChannelHandlerContext | ctx, |
|
|
Channel | c, |
|
|
Object | msg ) throws Exception |
|
protected |
Definition at line 14 of file ServiceResponseEncoder.java.
14 {
15 if (msg instanceof ServiceResponse) {
16 byte[] bytes = IndexedFileSystem.bytes;
17 ChannelBuffer buf = ChannelBuffers.buffer(bytes.length+4);
18 buf.writeInt(bytes.length);
19 buf.writeBytes(bytes);
20
21 System.out.println("Responding with packet to client with size " + bytes.length);
22 return buf;
23 }
24 return msg;
25 }
References dev.advo.fs.fs.IndexedFileSystem.bytes.
The documentation for this class was generated from the following file: