Examples of Codec


Examples of net.sf.dvorcode.Dvorcode.Codec

    @Test
    public void testTranscode_String_DvorcodeCodec_blankCypher() {

        System.out.println("transcode (blank cypher)");
        String cypher = "";
        Codec direction = DECODE;
        String expResult = "";
        String result = Dvorcode.transcode(cypher, direction);
        assertEquals(expResult, result);
    }
View Full Code Here

Examples of net.sf.hajdbc.codec.Codec

    String clusterId = args[0];
    String value = args[1];
   
    try
    {
      Codec codec = new HexCodecFactory().createCodec(clusterId);

      System.out.println(codec.encode(value));
    }
    catch (SQLException e)
    {
      e.printStackTrace(System.err);
    }
View Full Code Here

Examples of net.sourceforge.jaad.mp4.api.Track.Codec

  private final Codec originalFormat;

  protected Protection(Box sinf) {
    //original format
    final long type = ((OriginalFormatBox) sinf.getChild(BoxTypes.ORIGINAL_FORMAT_BOX)).getOriginalFormat();
    Codec c;
    //TODO: currently it tests for audio and video codec, can do this any other way?
    if(!(c = AudioTrack.AudioCodec.forType(type)).equals(AudioTrack.AudioCodec.UNKNOWN_AUDIO_CODEC)) originalFormat = c;
    else if(!(c = VideoTrack.VideoCodec.forType(type)).equals(VideoTrack.VideoCodec.UNKNOWN_VIDEO_CODEC)) originalFormat = c;
    else originalFormat = null;
  }
View Full Code Here

Examples of net.sourceforge.peers.sdp.Codec

        } catch (NoCodecException e) {
            logger.error(e.getMessage(), e);
        }
        String remoteAddress = mediaDestination.getDestination();
        int remotePort = mediaDestination.getPort();
        Codec codec = mediaDestination.getCodec();
        String localAddress = userAgent.getConfig()
            .getLocalInetAddress().getHostAddress();

        userAgent.getMediaManager().successResponseReceived(localAddress,
                remoteAddress, remotePort, codec);
View Full Code Here

Examples of org.ajax4jsf.util.base64.Codec

  }

  public ResourceBuilderImpl() {
    super();
    _startTime = System.currentTimeMillis();
    codec = new Codec();
    renderers = new HashMap<String, ResourceRenderer>();
    // append known renderers for extentions.
    renderers.put(".gif", new GifRenderer());
    ResourceRenderer renderer = new JpegRenderer();
    renderers.put(".jpeg", renderer);
View Full Code Here

Examples of org.apache.hadoop.hbase.codec.Codec

  @Test
  public void testEmptyWorks() throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    CountingOutputStream cos = new CountingOutputStream(baos);
    DataOutputStream dos = new DataOutputStream(cos);
    Codec codec = new CellCodec();
    Codec.Encoder encoder = codec.getEncoder(dos);
    encoder.flush();
    dos.close();
    long offset = cos.getCount();
    assertEquals(0, offset);
    CountingInputStream cis =
      new CountingInputStream(new ByteArrayInputStream(baos.toByteArray()));
    DataInputStream dis = new DataInputStream(cis);
    Codec.Decoder decoder = codec.getDecoder(dis);
    assertFalse(decoder.advance());
    dis.close();
    assertEquals(0, cis.getCount());
  }
View Full Code Here

Examples of org.apache.hadoop.raid.Codec

   *              null if it is the block which is currently being written to
   * @return the block locations of companion blocks
   */
  List<LocatedBlock> getCompanionBlocks(String path, FileInfo info, Block block)
      throws IOException {
    Codec codec = info.codec;
    switch (info.type) {
      case NOT_RAID:
        return Collections.emptyList();
      case HAR_TEMP_PARITY:
        return getCompanionBlocksForHarParityBlock(
View Full Code Here

Examples of org.apache.harmony.pack200.Codec

        for (int i = 0; i < 255; i++)
            decode(Codec.BYTE1, new byte[] { (byte) i }, i, 0);
    }

    public void testByte1Delta() throws Exception {
        Codec BYTE1D = new BHSDCodec(1, 256, 0, 1);
        long last = 0;
        for (int i = 1; i < 255; i++)
            last = decode(BYTE1D, new byte[] { (byte) 1 }, i, last);
    }
View Full Code Here

Examples of org.apache.harmony.pack200.Codec

        for (int i = 1; i < 255; i++)
            last = decode(BYTE1D, new byte[] { (byte) 1 }, i, last);
    }

    public void testByte1DeltaException() throws Exception {
        Codec BYTE1D = new BHSDCodec(1, 256, 0, 1);
        try {
            BYTE1D.decode(new ByteArrayInputStream(new byte[] { (byte) 1 }));
            fail("Decoding with a delta stream and not passing a last value should throw exception");
        } catch (Pack200Exception e) {
            assertTrue(true);
        }
    }
View Full Code Here

Examples of org.apache.harmony.pack200.Codec

            assertTrue(true);
        }
    }

    public void testByte1Signed() throws Exception {
        Codec BYTE1S2 = new BHSDCodec(1, 256, 2);
        decode(BYTE1S2, new byte[] { 0 }, 0, 0);
        decode(BYTE1S2, new byte[] { 1 }, 1, 0);
        decode(BYTE1S2, new byte[] { 2 }, 2, 0);
        decode(BYTE1S2, new byte[] { 3 }, -1, 0);
        decode(BYTE1S2, new byte[] { 4 }, 3, 0);
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.