Examples of Decoder


Examples of SevenZip.Compression.LZMA.Decoder

    for (int i = 0; i < 4; i++)
      dictionarySize += ((props[1 + i]) & 0xFF) << (i * 8);
   
    if(dictionarySize < 0) throw new InvalidCompressedDataException("Invalid dictionary size");
    if(dictionarySize > MAX_DICTIONARY_SIZE) throw new TooBigDictionaryException();
    Decoder decoder = new Decoder();
    if(!decoder.SetDecoderProperties(props)) throw new InvalidCompressedDataException("Invalid properties");
    decoder.Code(is, cos, maxLength);
    //cos.flush();
    return cos.written();
  }
View Full Code Here

Examples of SevenZip.Compression.LZMA.Decoder

    }

  @Override
  public long decompress(InputStream is, OutputStream os, long maxLength, long maxCheckSizeBytes) throws IOException, CompressionOutputSizeException {
    CountedOutputStream cos = new CountedOutputStream(os);
    Decoder decoder = new Decoder();
    decoder.SetDecoderProperties(props);
    decoder.Code(is, cos, maxLength);
    return cos.written();
  }
View Full Code Here

Examples of SevenZip.Compression.LZMA.Decoder

    DecoderThread(InputStream _in)
    {
        q = ConcurrentBufferOutputStream.newQueue();
        in = _in;
        out = ConcurrentBufferOutputStream.create(q);
        dec = new Decoder();
        exn = null;
        if (DEBUG)
        {
            dbg.printf("%s >> %s (%s)%n", this, out, q);
        }
View Full Code Here

Examples of api.Decoder

    @Override
    public Vector decode(InputStream data) throws DecodingException {
        Integer constructor = intDecoder.decode(data);
        Class containerClass = typeDecoders.get(constructor);
        Decoder typeDecoder = decoderMap.get(containerClass);
        int count = intDecoder.decode(data);
        Vector output = new Vector();
        for (int i = 0; i < count; ++i) {
            Object element = typeDecoder.decode(data);
            output.add(i, element);
        }
        return output;
    }
View Full Code Here

Examples of co.cask.cdap.common.io.Decoder

  }

  @Override
  public KeyIdentifier decode(byte[] data) throws IOException {
    ByteArrayInputStream bis = new ByteArrayInputStream(data);
    Decoder decoder = new BinaryDecoder(bis);

    DatumReader<KeyIdentifier> reader = readerFactory.create(KEY_IDENTIFIER_TYPE,
                                                             KeyIdentifier.Schemas.getCurrentSchema());
    int readVersion = decoder.readInt();
    Schema readSchema = KeyIdentifier.Schemas.getSchemaVersion(readVersion);
    if (readSchema == null) {
      throw new IOException("Unknown schema version for KeyIdentifier: " + readVersion);
    }
    return reader.read(decoder, readSchema);
View Full Code Here

Examples of com.biasedbit.nettytutorials.customcodecs.common.Decoder

            @Override
            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline pipeline = Channels.pipeline();
                pipeline.addLast("encoder", Encoder.getInstance());
                pipeline.addLast("decoder", new Decoder());
                pipeline.addLast("handler", new ServerHandler(channelGroup));
                return pipeline;
            }
        };
View Full Code Here

Examples of com.caucho.quercus.lib.i18n.Decoder

   */
  public StringValue toUnicodeValue(Env env, String charset)
  {
    StringValue sb = new UnicodeBuilderValue();

    Decoder decoder = Decoder.create(charset);

    sb.append(decoder.decode(env, this));

    return sb;
  }
View Full Code Here

Examples of com.corundumstudio.socketio.parser.Decoder

        ackManager = new AckManager(scheduler);

        JsonSupport jsonSupport = configuration.getJsonSupport();
        Encoder encoder = new Encoder(jsonSupport);
        Decoder decoder = new Decoder(jsonSupport, ackManager);

        heartbeatHandler = new HeartbeatHandler(configuration, scheduler);
        PacketListener packetListener = new PacketListener(heartbeatHandler, ackManager, namespacesHub);

        String connectPath = configuration.getContext() + "/" + protocol + "/";
View Full Code Here

Examples of com.mmoscene.h4j.network.codec.Decoder

    private SessionManager session_manager;

    public Network() {
        bootstrap.getPipeline().addLast("encoder", new Encoder());
        bootstrap.getPipeline().addLast("decoder", new Decoder());
        bootstrap.getPipeline().addLast("handler", new NetworkManager());
        bootstrap.getPipeline().addLast("pipelineExecutor", new ExecutionHandler
                (
                        new OrderedMemoryAwareThreadPoolExecutor(
                                200,
View Full Code Here

Examples of com.noelios.restlet.application.Decoder

        FixedEncoder encoder = new FixedEncoder(context);
        encoder.setEncodeRequest(false);
        encoder.setEncodeResponse(true);
        encoder.setNext(router);

        Decoder decoder = new Decoder(context);
        decoder.setDecodeRequest(true);
        decoder.setDecodeResponse(false);
        decoder.setNext(encoder);

        return decoder;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.