1package dev.advo.fs.net.service;
3import org.jboss.netty.buffer.ChannelBuffer;
4import org.jboss.netty.buffer.ChannelBuffers;
5import org.jboss.netty.channel.Channel;
6import org.jboss.netty.channel.ChannelHandlerContext;
7import org.jboss.netty.handler.codec.oneone.OneToOneEncoder;
9import dev.advo.fs.fs.IndexedFileSystem;
14 protected Object
encode(ChannelHandlerContext ctx, Channel c, Object msg)
throws Exception {
17 ChannelBuffer buf = ChannelBuffers.buffer(bytes.length+4);
18 buf.writeInt(bytes.length);
19 buf.writeBytes(bytes);
21 System.out.println(
"Responding with packet to client with size " + bytes.length);
A file system based on top of the operating system's file system.
Object encode(ChannelHandlerContext ctx, Channel c, Object msg)