How can I convert characters into ascii code numbers ??

Read the characters or String from keyboard input then I want the sum of the ascii code of the String or the characters. Please help ....
Han

Read the characters or String from keyboard input
put then I want the sum of the ascii code of the
String or the characters. Please help ....
HanThe keyboard input part is a little more coding envolved. Here is a sample of what can be done if
you know what to implement. It needs three classes
from the java.io package. Well, here is the complete
source code for the 'keyboard input' and a driver
class to test it.
//package consoleclass;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
class Driver
     public static void main ( String[] args)
          System.out.println("Enter a number");
          int number = MyInput.readInt();
          System.out.println("number entered "+ number);
          System.out.println("Enter another number");
          number = MyInput.readInt();
          System.out.println("number entered "+ number);
class MyInput
  /**Read a string from the keyboard*/
  public static String readString()
     BufferedReader br
       = new BufferedReader(new InputStreamReader(System.in), 1);
     // Declare and initialize the string
     String string = " ";
     // Get the string from the keyboard
     try
       string = br.readLine();
     catch (IOException ex)
       System.out.println(ex);
     // Return the string obtained from the keyboard
     return string;
  /**Read an int value from the keyboard*/
  public static int readInt()
     return Integer.parseInt(readString());
  /**Read a double value from the keyboard*/
  public static double readDouble()
     return Double.parseDouble(readString());
}

Similar Messages

  • I have 13 dollars left on an apple store gift card, how can I convert this into money for my iTunes account?

    I have 13 dollars left on an apple store gift card, how can I convert this into money for my iTunes account?

    You can't.

  • How can I convert imovie into photo's

    How can I convert imovie into photo's

    For iMovie 11, you will need to download a free tool called MPEG Streamclip from Squared 5. (Google it). This is a very handy tool to have if you make videos.
    In iMovie, select the clip that contains the frame that you want. Right-click on the clip and select Reveal in Finder.
    You should see the clip highlighted in the Finder. Drag this clip into MPEG Streamclip. Move the playhead to the frame you want. Then click FILE/EXPORT FRAME. You can choose JPEG, TIFF, or PNG.

  • Need help with converting characters to ASCII code

    Hey. Im trying to write a program to make Caesar Ciphers by random numbers. This cipher must also wrap from front to end of ASCII code, so that if, for example, the character being ciphered is Z and its being modified by +3, the result ciphered character is not "]", but "c".
    Im planning on reading the text that the user inputs (using ConsoleIO) into a string and then seperating each character into a character[]. Then, i would like to find the ASCII code of each character and print out the ASCII code character of the old ASCII code + the modifier.
    So far, this is what i have (sorry for the length, i like to space things out so that its easier on the eyes and more organized... X-( ... ):
    public class EvanFinalB {
         static ConsoleIO kbd = new ConsoleIO();
         static String enteredPhrase;
         static int phraseLength;
         public static void main(String[] args)
              System.out.println("Enter a phrase and this program will cipher it into a secret message.");
              System.out.println("/nEnter your phrase here:");
              //read phrase
              enteredPhrase = kbd.toString();
              //find length of entered text
              phraseLength = enteredPhrase.length();
              //declare arrays for the individual characters of the entered text and the ciphered characters
              char[] enteredChar = new char[phraseLength + 1];
              char[] cipheredChar = new char[phraseLength + 1];
              //loop converting of entered text into seperate characters
              for(int x = 1; x <= phraseLength; x++)
                   enteredChar[x] = enteredPhrase.charAt(x);
                   cipheredChar[x] = cipher(enteredChar[x]);//call cipher() method to find new ciphered character
         //wrap from front to end of ASCII code
         static char cipher(char enteredChar)
              //choose random number to cipher message by
              int modifier = (int)(Math.random() * 26) + 1;
              if(enteredChar + modifier > 90)//90 is the ASCII code for "Z" which is the last capital letter
                   cipheredChar = (97 + (modifier - (90 - enteredChar)));//97 is the ASCII code for "a" which is the first lower case letter
              return cipheredChar[1];
    }The program is obviously in its early stages but (i started creating it today actually), if there is a simple method or anything that i can use to find the ASCII value of a character in order to use enteredChar so that 'enteredChar' is equal to the ASCII code of the new ciphered character, please help me out...Thanks
    P.S. If there's an easier way to go about creating a program for Caesar Ciphers, let me know.

    The following code is from my Java textbook Big Java by Cay Horstmann. It is not my code and it's just to guide you in your own cipher.
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.io.IOException;
       This class encrypts files using the Caesar cipher.
       For decryption, use an encryptor whose key is the
       negative of the encryption key.
    public class CaesarCipher
          Constructs a cipher object with a given key.
          @param aKey the encryption key
       public CaesarCipher(int aKey)
          key = aKey;
          Encrypts the contents of a stream.
          @param in the input stream
          @param out the output stream
       public void encryptStream(InputStream in, OutputStream out)
             throws IOException
          boolean done = false;
          while (!done)
             int next = in.read();
             if (next == -1) done = true;
             else
                byte b = (byte) next;
                byte c = encrypt(b);
                out.write(c);
          Encrypts a byte.
          @param b the byte to encrypt
          @return the encrypted byte
       public byte encrypt(byte b)
          return (byte) (b + key);
       private int key;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.util.Scanner;
       This program encrypts a file, using the Caesar cipher.
    public class CaesarEncryptor
       public static void main(String[] args)
          Scanner in = new Scanner(System.in);
          try
             System.out.print("Input file: ");
             String inFile = in.next();
             System.out.print("Output file: ");
             String outFile = in.next();
             System.out.print("Encryption key: ");
             int key = in.nextInt();
             InputStream inStream = new FileInputStream(inFile);
             OutputStream outStream = new FileOutputStream(outFile);
             CaesarCipher cipher = new CaesarCipher(key);
             cipher.encryptStream(inStream, outStream);
             inStream.close();
             outStream.close();
          catch (IOException exception)
             System.out.println("Error processing file: " + exception);
    }

  • Apple mail converting attachments into ascii code?!

    Hi,
    I am working on a Retina MBP. For some unexplicable reason sometimes when I move an email between folders in Mail the email seems to become corrupted and turns in to ASCII code (I think). There seems to be no rhyme or reason as to why it sometimes happens and most of the time doesn't. I'll get an email and read it in my inbox then transfer it to a folder and go back to read it and it looks like this:
    --Apple-Mail=_A9B8159A-26EF-4733-9B9D-9A3112F5F60B
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/plain;
         charset=us-ascii
    Hey Tom,
    How are you.=20
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut =
    labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco =
    laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in =
    voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat =
    Thanks,
    Ele
    --Apple-Mail=_A9B8159A-26EF-4733-9B9D-9A3112F5F60B
    Content-Type: multipart/mixed;
         boundary="Apple-Mail=_AF8260B5-4C4F-4338-A6BD-56269F2A5E41"
    --Apple-Mail=_AF8260B5-4C4F-4338-A6BD-56269F2A5E41
    Content-Transfer-Encoding: 7bit
    Content-Type: text/html;
         charset=us-ascii
    <html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hey Tom,</div><div><br></div><div>Bit of advice please. </div><div><br></div><div>Annie wants to play a track called The Anger Games by K9. It contains a sample of Tom Jones in the comedy film Tropic Thunder containing the lyrics:  "Take a big step back and literally **** your own face?" x 6  + *gun sounds* x 2 + "I will **** you up" x 2 + "I'm gonna massacre you." 2</div><div><br></div><div>Track attached</div></body></html>
    --Apple-Mail=_AF8260B5-4C4F-4338-A6BD-56269F2A5E41
    Content-Disposition: attachment;
         filename="01 The Anger Games (Original Mix).mp3"
    Content-Type: audio/mpeg;
         x-unix-mode=0644;
         name="01 The Anger Games (Original Mix).mp3"
    Content-Transfer-Encoding: base64
    SUQzBAAAAAZQMkFQSUMAAmkhAAAAaW1hZ2UvanBlZwADAP/Y/+AAEEpGSUYAAQEAAAEAAQAA/9sA
    QwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8n
    OT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy
    MjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgB9AH0AwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAA
    AAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQy
    gZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVm
    Z2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS
    09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYH
    And then that code goes on for PAGES & PAGES!
    Any suggestions of what's going on welcome. I'm using an IMAP account in Mail FYI.

    Quit Mail. Force quit if necessary.
    Back up all data. That means you know you can restore the Mail database, no matter what happens.
    Triple-click the line below on this page to select it:
    ~/Library/Mail/V2/MailData/Envelope Index
    Copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder
    from the menu bar. Paste into the box that opens (command-V), then press return.
    A Finder window will open with a file selected. Move the selected file to the Desktop, leaving the window open. Other files in the folder may have names that begin with "Envelope Index". Move those files, if any, to the Trash.
    Log out and log back in. Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is corrupt and that Mail has to quit. Click OK.
    Test. If Mail now works as expected, you can delete the file you moved to the Desktop. Otherwise, post your results.

  • How can I convert .fla into .PSD?

    I have a .PSD file that is a significant part of the website I am working on and I can only edit it properly with Adobe Flash Professional CS5 (out of the programs I have, GIMP doesn't work how I need it to). The problem is, I can easily open a .PSD file with Adobe Flash CS5 but I cannot SAVE it as a .PSD, it only allows me to save it as a .fla or something else that is an uncompressed .fla but I forget it's name. Neither of these work for what I need so how can I SAVE it as a .PSD or CONVERT it into a .PSD? Any help is greatly appreciated. Thanks!

    I`m trying to understand why you would need to use psd file on a website. A psd file can`t be displayed in a browser.
    The usual way is to use a psd file more as a sort of archive for multiple images (for example all buttons on a website) and then to webexport the photoshop layers as slices or separate png/jpg files?
    Anyway, you won`t be able to skip photoshop itself to save to a photoshop file.
    Here you can download a trial that willl let you work 30 days on the psd-side:
    http://www.adobe.com/downloads/

  • HELP... How can i implement this into my code

    Hello :) I'm writing a simple game here is the code now all it does right now is it writes out the values of the cards on the screen in an applet however I want it to display card images from http://www.waste.org/~oxymoron/cards
    i can't get it to use the string values and give me the card images instead of simple text... please help a woman in trouble ;O) thank you
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    //import java.applet.*;
    ///import java.util.*;
    public class HighLowGUI extends JApplet {
       public void init() {
             // The init() method lays out the applet.
             // A HighLowCanvas occupies the CENTER position of the layout.
             // On the bottom is a panel that holds three buttons.  The
             // HighLowCanvas object listens for ActionEvents from the
             // buttons and does all the real work of the program.
          setBackground( new Color(130,50,40) );
          HighLowCanvas board = new HighLowCanvas();
          getContentPane().add(board, BorderLayout.CENTER);
          JPanel buttonPanel = new JPanel();
          buttonPanel.setBackground( new Color(220,200,180) );
          getContentPane().add(buttonPanel, BorderLayout.SOUTH);
          JButton higher = new JButton( "Deal" );
          higher.addActionListener(board);
          buttonPanel.add(higher);
          JButton newGame = new JButton( "New Game" );
          newGame.addActionListener(board);
          buttonPanel.add(newGame);
       }  // end init()
       class HighLowCanvas extends JPanel implements ActionListener {
            // A nested class that displays the cards and does all the work
             // of keeping track of the state and responding to user events.
          Deck deck;       // A deck of cards to be used in the game.
          Hand hand;       // The cards that have been dealt.
          String message;  // A message drawn on the canvas, which changes
                           //    to reflect the state of the game.
          boolean gameInProgress;  // Set to true when a game begins and to false
                                   //   when the game ends.
          Font bigFont;      // Font that will be used to display the message.
          Font smallFont;    // Font that will be used to draw the cards.
          HighLowCanvas() {
                // Constructor.  Creates sets the foreground and
                // background colors, and starts the first game.
          setBackground( new Color(0,120,0) );
             setForeground( Color.yellow);
                     //  smallFont = new Font("SansSerif", Font.PLAIN, 12);
                      // bigFont = new Font("Serif", Font.BOLD, 14);
            doNewGame();
          } // end constructor
          public void actionPerformed(ActionEvent evt) {
                 // Respond when the user clicks on a button by calling
                 // the appropriate procedure.  Note that the canvas is
                 // registered as a listener in applet's init() method.
             String command = evt.getActionCommand();
             if (command.equals("Deal"))
                doDeal();
             else if (command.equals("New Game"))
                doNewGame();
          } // end actionPerformed()
          void doDeal() {
                   // Called by actionPerformmed() when user clicks "Higher" button.
                   // Check the user's prediction.  Game ends if user guessed
                   // wrong or if the user has made three correct predictions.
             if (gameInProgress == false) {
                   // If the game has ended, it was an error to click "Higher",
                   // So set up an error message and abort processing.
                message = "Click \"New Game\" to start a new game!";
                repaint();
                return;
             hand.addCard( deck.dealCard() );     // Deal a card to the hand.
             int cardCt = hand.getCardCount();
             Card thisCard = hand.getCard( cardCt - 1 );  // Card just dealt.
             Card prevCard = hand.getCard( cardCt - 2 );  // The previous card.
             if ( thisCard.getValue() < prevCard.getValue() ) {
                gameInProgress = false;
                message = "Too bad! You lose.";
             else if ( thisCard.getValue() == prevCard.getValue() ) {
                gameInProgress = false;
                message = "Too bad!  You lose"; // on ties
             else if ( cardCt == 4) {    //CHANGED+++++++++++++++++=
                gameInProgress = false;
               message = "You win! Hurra! ";
             else {
                message = "Got it right!  Try for " + cardCt + " Press  -Deal- ";
             repaint();
          } // end
          void doNewGame() {
                 // Called by the constructor, and called by actionPerformed() if
                 // the use clicks the "New Game" button.  Start a new game.
             if (gameInProgress) {
                     // If the current game is not over, it is an error to try
                     // to start a new game.
                message = "You still have to finish this game! Press   -Deal-";
                repaint();
                return;
             deck = new Deck();   // Create the deck and hand to use for this game.
             hand = new Hand();
             deck.shuffle();
             hand.addCard( deck.dealCard() );  // Deal the first card into the hand.
             message = "Deal your cards";
             gameInProgress = true;
             repaint();
          } // end doNewGame()
          public void paintComponent(Graphics g) {
                // This method draws the message at the bottom of the
                // canvas, and it draws all of the dealt cards spread out
                // across the canvas.  If the game is in progress, an
                // extra card is dealt representing the card to be dealt next.
             super.paintComponent(g);
                  g.setFont(bigFont);
                  g.drawString(message,10,135);
                  g.setFont(smallFont);
             int cardCt = hand.getCardCount();
                  for (int i = 0; i < cardCt; i++)
                        drawCard(g, hand.getCard(i), 10 + i * 90, 10);
             if (gameInProgress)
                drawCard(g, null, 10 + cardCt * 90, 10);
          } // end paintComponent()
          void drawCard(Graphics g, Card card, int x, int y) {
                  // Draws a card as a 80 by 100 rectangle with
                  // upper left corner at (x,y).  The card is drawn
                  // in the graphics context g.  If card is null, then
                  // a face-down card is drawn.  (The cards are
                  // rather primitive.)
             if (card == null) {      // Draw a face-down card
                g.setColor(Color.blue);
                g.fillRect(x,y,80,100);
                g.setColor(Color.white);
                g.drawRect(x+3,y+3,73,93);
                g.drawRect(x+4,y+4,71,91);
             else {
                g.setColor(Color.white);
                g.fillRect(x,y,80,100);
                g.setColor(Color.gray);
                g.drawRect(x,y,79,99);
                g.drawRect(x+1,y+1,77,97);
             if (card.getSuit() == Card.DIAMONDS || card.getSuit() == Card.HEARTS)
                g.setColor(Color.red);
             else
                g.setColor(Color.black);
                g.drawString(card.getValueAsString(), x + 10, y + 30);
                g.drawString("of", x+ 10, y + 50);
                g.drawString(card.getSuitAsString(), x + 10, y + 70);
          } // end drawCard()
       } // end nested class HighLowCanvas
    } // end class HighLowGUI
       An object of class card represents one of the 52 cards in a
       standard deck of playing cards.  Each card has a suit and
       a value.
    public class Card {
        public final static int SPADES = 0,       // Codes for the 4 suits.
                                HEARTS = 1,
                                DIAMONDS = 2,
                                CLUBS = 3;
        public final static int ACE = 1,          // Codes for the non-numeric cards.
                                JACK = 11,        //   Cards 2 through 10 have their
                                QUEEN = 12,       //   numerical values for their codes.
                                KING = 13;
        private final int suit;   // The suit of this card, one of the constants
                                  //    SPADES, HEARTS, DIAMONDS, CLUBS.
        private final int value;  // The value of this card, from 1 to 11.
        public Card(int theValue, int theSuit) {
                // Construct a card with the specified value and suit.
                // Value must be between 1 and 13.  Suit must be between
                // 0 and 3.  If the parameters are outside these ranges,
                // the constructed card object will be invalid.
            value = theValue;
            suit = theSuit;
        public int getSuit() {
                // Return the int that codes for this card's suit.
            return suit;
        public int getValue() {
                // Return the int that codes for this card's value.
            return value;
        public String getSuitAsString() {
                // Return a String representing the card's suit.
                // (If the card's suit is invalid, "??" is returned.)
            switch ( suit ) {
               case SPADES:   return "Spades";
               case HEARTS:   return "Hearts";
               case DIAMONDS: return "Diamonds";
               case CLUBS:    return "Clubs";
               default:       return "??";
        public String getValueAsString() {
                // Return a String representing the card's value.
                // If the card's value is invalid, "??" is returned.
            switch ( value ) {
               case 1:   return "A";
               case 2:   return "2";
               case 3:   return "3";
               case 4:   return "4";
               case 5:   return "5";
               case 6:   return "6";
               case 7:   return "7";
               case 8:   return "8";
               case 9:   return "9";
               case 10:  return "10";
               case 11:  return "J";
               case 12:  return "Q";
               case 13:  return "K";
               default:  return "??";
        public String toString() {
               // Return a String representation of this card, such as
               // "10 of Hearts" or "Queen of Spades".
            return getValueAsString() + " of " + getSuitAsString();
    } // end class Card
        An object of type Deck represents an ordinary deck of 52 playing cards.
        The deck can be shuffled, and cards can be dealt from the deck.
    public class Deck {
        private Card[] deck;   // An array of 52 Cards, representing the deck.
        private int cardsUsed; // How many cards have been dealt from the deck.
        public Deck() {       // Create an unshuffled deck of cards.
           deck = new Card[52];
           int cardCt = 0;    // How many cards have been created so far.
           for ( int suit = 0; suit <= 3; suit++ ) {
              for ( int value = 1; value <= 13; value++ ) {
                 deck[cardCt] = new Card(value,suit);
                 cardCt++;
           cardsUsed = 0;
        public void shuffle() {
              // Put all the used cards back into the deck, and shuffle it into
              // a random order.
            for ( int i = 51; i > 0; i-- ) {
                int rand = (int)(Math.random()*(i+1));
                Card temp = deck;
    deck[i] = deck[rand];
    deck[rand] = temp;
    cardsUsed = 0;
    public int cardsLeft() {
    // As cards are dealt from the deck, the number of cards left
    // decreases. This function returns the number of cards that
    // are still left in the deck.
    return 52 - cardsUsed;
    public Card dealCard() {
    // Deals one card from the deck and returns it.
    if (cardsUsed == 52)
    shuffle();
    cardsUsed++;
    return deck[cardsUsed - 1];
    } // end class Deck
    An object of type Hand represents a hand of cards. The maximum number of
    cards in the hand can be specified in the constructor, but by default
    is 5. A utility function is provided for computing the value of the
    hand in the game of Blackjack.
    import java.util.Vector;
    public class Hand {
    private Vector hand; // The cards in the hand.
    public Hand() {
    // Create a Hand object that is initially empty.
    hand = new Vector();
    public void clear() {
    // Discard all the cards from the hand.
    hand.removeAllElements();
    public void addCard(Card c) {
    // Add the card c to the hand. c should be non-null. (If c is
    // null, nothing is added to the hand.)
    if (c != null)
    hand.addElement(c);
    public void removeCard(Card c) {
    // If the specified card is in the hand, it is removed.
    hand.removeElement(c);
    public void removeCard(int position) {
    // If the specified position is a valid position in the hand,
    // then the card in that position is removed.
    if (position >= 0 && position < hand.size())
    hand.removeElementAt(position);
    public int getCardCount() {
    // Return the number of cards in the hand.
    return hand.size();
    public Card getCard(int position) {
    // Get the card from the hand in given position, where positions
    // are numbered starting from 0. If the specified position is
    // not the position number of a card in the hand, then null
    // is returned.
    if (position >= 0 && position < hand.size())
    return (Card)hand.elementAt(position);
    else
    return null;
    public void sortBySuit() {
    // Sorts the cards in the hand so that cards of the same suit are
    // grouped together, and within a suit the cards are sorted by value.
    // Note that aces are considered to have the lowest value, 1.
    Vector newHand = new Vector();
    while (hand.size() > 0) {
    int pos = 0; // Position of minimal card.
    Card c = (Card)hand.elementAt(0); // Minumal card.
    for (int i = 1; i < hand.size(); i++) {
    Card c1 = (Card)hand.elementAt(i);
    if ( c1.getSuit() < c.getSuit() ||
    (c1.getSuit() == c.getSuit() && c1.getValue() < c.getValue()) ) {
    pos = i;
    c = c1;
    hand.removeElementAt(pos);
    newHand.addElement(c);
    hand = newHand;
    public void sortByValue() {
    // Sorts the cards in the hand so that cards of the same value are
    // grouped together. Cards with the same value are sorted by suit.
    // Note that aces are considered to have the lowest value, 1.
    Vector newHand = new Vector();
    while (hand.size() > 0) {
    int pos = 0; // Position of minimal card.
    Card c = (Card)hand.elementAt(0); // Minumal card.
    for (int i = 1; i < hand.size(); i++) {
    Card c1 = (Card)hand.elementAt(i);
    if ( c1.getValue() < c.getValue() ||
    (c1.getValue() == c.getValue() && c1.getSuit() < c.getSuit()) ) {
    pos = i;
    c = c1;
    hand.removeElementAt(pos);
    newHand.addElement(c);
    hand = newHand;

    Please don't crosspost. It cuts down on the effectiveness of responses, leads to people wasting their time answering what others have already answered, makes for difficult discussion, and is generally just annoying and bad form.

  • How can i convert image into pdf  file

    Hi Friends,
    I want to convert image file(i.e. jpeg,bmp,gif) into pdf file using java apis OR is there any tool which can convert it & which we can integrate into our java application
    Thanks in adva.

    Is there any solution to this case.....?

  • How can I convert alaw into alaw_rtp???

    Hi everybody:
    I need to convert audio in alaw format into alaw_rtp format. I'm using JMF but it doesn't work with alaw_rtp. Any idea??
    Thank's!
    Edited by: pedrorp on Apr 1, 2009 12:14 AM

    I need to convert audio in alaw format into alaw_rtp format. I'm using JMF but it doesn't work with alaw_rtp. Any idea??Well, you could write your own depacketizer for it...like was suggested / code was provided for / instructions for use were given to...on the ancient thread you dug up and posted on, but apparently didn't read.
    Alternately, you could use FMJ as a JMF replacement as JMF apparently does ALAW-RTP...as was also instructed on the ancient thread you dug up, but apparently didn't read.
    So yeah, my overall thought is... had you read the old thread rather than posting an SOS message at the bottom of it, your problem would already be solved.

  • How can I convert mp3 into an aiff for Final Cut?

    I need to to convert a mp3 into a aiff to use in final cut pro. Could do it easy in past itunes version. Don't see the preference option in itunes 9.0.1. Am I missing something? Any advice?

    Name
    Source
    Target
    Audio Codec
    pcm_s16le
    pcm_s16le
    Audio SampleRate(hz)
    48000
    44100
    Audio BitRate(bps)
    1536000
    352800
    Audio Channels
    Stereo
    Stereo
    Video Codec
    dvvideo
    Apple ProRes 422
    Video Size(pix)
    720*480
    1920*1080
    Video BitRate(kbps)
    24417
    18000
    Video FrameRate(fps)
    29.97
    23.976
    File Size
    7.506GB
    Free disk space:15.969GB
    This is what appears when I use the brorsoft video converter. Maybe I don,t use it correctly, but the result is not good...

  • How can I write someting into the Code Library

    have developed Program for continious Pattern Streaming from and to Hard Disk in Microsoft Visual C++.Net;up to 280 Mbit/s Outputrate and 130 Mbit/s Inputrate

    Wow! sounds amazing, if you just go to the link on the left to code library there is a link at the bottom to submit a program, just zip it up and submite it. I'll look for it!
    Gazoo!

  • How can I convert feet to meters using Numbers

    Does anyone have a formula for converting feet  to meters?

    Convert m to in, QUOTIENT will give you the number of feet, MOD will provide the number of inches left over, truncated to the last full inch.
    If you want the result rounded to the nearer full inch, round the result of the initial conversion. If you need fractions of inches (ludicrous if the original figure is to the nearest metre), that can be done as well.
    m in B2,
    formula in C2: =ROUND(B2*39.3700787,0)  (inches, rounded to nearer full inch)
    formula in D2: =QUOTIENT(ROUND(B2*39.3700787,0),12)&" Ft. "&MOD(ROUND(B2*39.3700787,0),12)&" In."
    Regards,
    Barry

  • Saving characters with ASCII codes (128 - 256) into txt file problem

    Hello,
    I am saving a query results into a text file (test.txt) with this procedure:
    BEGIN
    OWA_UTIL.mime_header ('application/octet', FALSE);
    HTP.p ('Content-Disposition: attachment; filename="TEST.TXT"');
    OWA_UTIL.http_header_close;
    for rec in (select sample_text from tmp)
    loop
    htp.prn ( chr(230) || rec.sample_text || utl_tcp.crlf);
    end loop;
    -- Send an error code so that the rest of the HTML does not render
    HTMLDB_APPLICATION.g_unrecoverable_error := TRUE;
    END;
    How can I save characters with ascii codes from 128 - 256 into the output file? If I use chr() function, characters are missing in the output file.
    Platform: Apex 4.2 on apex.oracle.com

    Hi 1010398,
    Some thoughts:
    I assume you've counted the characters in the output and/or used a "hex" text editor so you KNOW these characters are not being written. Are they not written at all, or are blanks being substituted or are NULLs being substituted?
    I couldn't find much documentation on htp.prn. Though, one place I found
    htp.prn (cbuf IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL);Do you suppose it's affected by the character set used?
    Howard

  • How can i convert this data(00000000) into date format(yyyy-MM-dd)

    Hi,
    i am using this method to convert date format from string.
    public static string FormatDate(string inputDate, string inputFormat)
                System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
                string datepresent = DateTime.Now.Date.ToString("yyyy-MM-dd");
                return datepresent;
    its working properly,
    but when input data is like 00000000 i am getting error this is not valid.
    how can i convert this into date format any help..!

    Have you tried the above code:
    I can see it is working with both Date and DateTime destination nodes.
    Map:
    Functoid Parameters:
    Functoid Script:
    public static string FormatDate(string inputDate, string inputFormat)
    string datepresent;
    if (inputDate == "00000000")
    datepresent = "0000-00-00";
    else
    System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
    datepresent = date.ToString("yyyy-MM-dd");
    return datepresent;
    Input:
    <ns0:InputDateString xmlns:ns0="http://DateFormat.SourceSchema">
    <DateString>00000000</DateString>
    </ns0:InputDateString>
    Output:
    <ns0:OutputDate xmlns:ns0="http://DateFormat.DestinationSchema">
    <Date>0000-00-00</Date>
    </ns0:OutputDate>
    If this answers your question please mark as answer. If this post is helpful, please vote as helpful.

  • How can I convert a String into an int?

    I need to use command-line args. So I enter "java Main 123" and I want to use 123 not as a String but as an int.
    How can I convert it into an int?
    Thank You!!
    Sprocket

    Example method (you don't need to use a method unless you do this a lot)
    private int stringTOInt (String aString)
    int result = 0;
    try
    result = Integer.parseString(aString);
    catch (Exception ex)
    System.out.println ("Failed to convert string " + aString + " to int.");
    return result;
    }

Maybe you are looking for

  • Mid 2010 Macbook Pro (15") - GPUPanic after updating to Mavericks

    I started getting this GPUPanic error ever since I updated Mac OS to Mavericks from Snow Leopard and now it keeps crashing very often. After researching online I found that this macbook did have a manufacturing defect with its logic board (reffereing

  • Error whil creating Service Line item in ME51N using BAPI_PR_CREATE

    Hi Experts,             Am able to create PR number using BAPI_PR_CREATE, but when am trying to create Service line item am getting acc assignment error please check my code and solve my issue. ..its very adj  please help me . DATA : t_bapimereqitemi

  • How do I get Adobe reader to be recognized on my Devices and Printers?

    How do I get Adobe reader to be recognized on my Devices and Printers?

  • Error when installing CS4 on windows

    I had a total hard drive failure. Afer replacing my HD I downloaded my apps and am now trying to reinstall. Everytime I try to install, the installation program crashes halfway through and thenshuts down. What do I have to do? I am reinstalling CS4 w

  • RAM on a macbook pro 2012

    I have been looking at youtube videos regarding changing the RAM on my macbook pro. Is there a big difference from 4GB of RAM to 8GB ? My macbook is still very new and under full warrenty both with apple and the store where it was bought. If i was to