About parseNumbers() method in StreamTokenizer

This is about StreamTokenizer class in java.io package...
If we read two strings..
[1]
say "abcd123"
then sval="abcd123"
But
[2]
second string say
"123abcd"
then for first token we have nval=123.0
and for next token we have sval="abcd"
here ,Output does not change whether we use or don't use parseNumber()
Then when parseNumber() is actually used?
And can anybody give me code which shows significance of parseNumbers() method

If I have understood you say that I can define
abstract a class even if it hasn't abstract methods.
Ok?Yes. Think OO: does it make sense to have a classes "Intern", "Contractor", "Employee", "Client", "Manager"? Yepp.
Does it make sense to make them extend "Person"? Yepp, why not? With address and such.
Does it make sense to have an object that's "just" a person? Not really - whatever this person does, he always has some kind of special semantics and abilities, which means that it might make sense to leave Person abstract - and there aren't even a methods defined yet that would enforce this decision anyway.
An other question: can I imagine that methods in
class ServletInputstream are native as, for example,
they strongly depend on operating system?You wouldn't know if they're not public - at least the API doesn't mention any. I doubt it has native methods itself, but it will probably rely on native methods it inherits from InputStream.
I would
have checked but is not so easy to find source code
for a real server implementation of JEE.
Thanks.Tomcat, JBoss..

Similar Messages

  • A question about a method with generic bounded type parameter

    Hello everybody,
    Sorry, if I ask a question which seems basic, but
    I'm new to generic types. My problem is about a method
    with a bounded type parameter. Consider the following
    situation:
    abstract class A{     }
    class B extends A{     }
    abstract class C
         public abstract <T extends A>  T  someMethod();
    public class Test extends C
         public <T extends A>  T  someMethod()
              return new B();
    }What I want to do inside the method someMethod in the class Test, is to
    return an instance of the class B.
    Normally, I'm supposed to be able to do that, because an instance of
    B is also an instance of A (because B extends A).
    However I cannot compile this program, and here is the error message:
    Test.java:16: incompatible types
    found   : B
    required: T
                    return new B();
                           ^
    1 errorany idea?
    many thanks,

    Hello again,
    First of all, thank you very much for all the answers. After I posted the comment, I worked on the program
    and I understood that in fact, as spoon_ says the only returned value can be null.
    I'm agree that I asked you a very strange (and a bit stupid) question. Actually, during recent months,
    I have been working with cryptography API Core in Java. I understood that there are classes and
    interfaces for defining keys and key factories specification, such as KeySpec (interface) and
    KeyFactorySpi (abstract class). I wanted to have some experience with these classes in order to
    understand them better. So I created a class implementing the interface KeySpec, following by a
    corresponding Key subclass (with some XOR algorithm that I defined myself) and everything was
    compiled (JDK 1.6) and worked perfectly. Except that, when I wanted to implement a factory spi
    for my classes, I saw for the first time this strange method header:
    protected abstract <T extends KeySpec> T engineGetKeySpec
    (Key key, Class<T> keySpec) throws InvalidKeySpecExceptionThat's why yesterday, I gave you a similar example with the classes A, B, ...
    in order to not to open a complicated security discussion but just to explain the ambiguous
    part for me, that is, the use of T generic parameter.
    The abstract class KeyFactorySpi was defined by Sun Microsystem, in order to give to security
    providers, the possibility to implement cryptography services and algorithms according to a given
    RFC (or whatever technical document). The methods in this class are invoked inside the
    KeyFactory class (If you have installed the JDK sources provided by Sun, You can
    verify this, by looking the source code of the KeyFactory class.) So here the T parameter is a
    key specification, that is, a class that implements the interface KeySpec and this class is often
    defined by the provider and not Sun.
    stefan.schulz wrote:
    >
    If you define the method to return some bound T that extends A, you cannot
    return a B, because T would be declared externally at invocation time.
    The definition of T as is does not make sense at all.>
    He is absolutely right about that, but the problem is, as I said, here we are
    talking about the implementation and not the invocation. The implementation is done
    by the provider whereas the invocation is done by Sun in the class KeyFactory.
    So there are completely separated.
    Therefore I wonder, how a provider can finally impelment this method??
    Besides, dannyyates wrote
    >
    Find whoever wrote the signature and shoot them. Then rewrite their code.
    Actually, before you shoot them, ask them what they were trying to achieve that
    is different from my first suggestion!
    >
    As I said, I didn't choose this method header and I'm completely agree
    with your suggestion, the following method header will do the job very well
    protected abstract KeySpec engineGetKeySpec (Key key, KeySpec key_spec)
    throws InvalidKeySpecException and personally I don't see any interest in using a generic bounded parameter T
    in this method header definition.
    Once agin, thanks a lot for the answers.

  • Where can I find the detail document about certain method of a class?????

    Moved to correct forum by moderator
    Hi everyone,
    where can I find the detail document about certain method of a class?????
    e.g.  the class CL_GUI_ALV_GRID , when I was going through the class and looking
    at the methods, sometimes the method description is just like the method name,
    and I cannot know what the method does. 
      so, I am wondering  where I can find the detail information about the class???
    Edited by: Matt on Dec 4, 2008 11:55 AM

    Hi,
    Most of the times the SAP itself provides the documentaion of the CLASS. when you click on the METHOD name the METHOD DOCUMENTATION button you can see on the application tool bar.
    more over the names of the methods suggest what it is going to do.
    SET_ATTRIBUTE( sets the attribute)
    GET_ATTRIBUTE( gets the attribute value that is provided to the method)
    GET_CHILDNODE
    BIND_TABLE
    etc
    like this
    regards
    Ramchander Rao.K

  • About calling method with arguments

    Hi,
    I have a problem about calling method using reflection. my method is like follows:
    public myMethod(Integer var1, MyObject mobj) {
    I've tried to call the method using the following code,
    Class[] parameterTypes = new Class[] {Integer.class, MyObject.class};
    Object[] arguments = new Object[] {new Integer(2), mobj};
    Method met=cl.getMethod("myMethod", parameterTypes);
    But the in the last line NoSuchMethodException is thrown.
    How can I send the reference of MyObject to myMethod()?
    Thanx
    rony

    Should work ok:
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    public class Test {
         static class MyObject {}
         public static void main(String[] args) throws Exception {
              Class c = Test.class;
              Class[] parameterTypes = new Class[] {Integer.class, MyObject.class};                              
              try {
                   Object[] arguments = new Object[] {new Integer(2), new MyObject()};
                   Method met = c.getMethod("myMethod", parameterTypes);
                   met.invoke(new Test(), arguments);
              } catch (NoSuchMethodException e) {
                   System.out.println(e);
              } catch (IllegalAccessException e) {
                     System.out.println(e);
              } catch (InvocationTargetException e) {
                   System.out.println(e);
         public void myMethod(Integer var1, MyObject mobj) {
              System.out.println("myMethod");
    }

  • Which of the following are true about abstract methods in EJB 2.0

    Hi guys I'm beginner to EJB and i got some unanswered questions.
    Can any one of you please.. give answers?
    Thanks if you do...
    Which of the following are true about abstract methods in EJB 2.0
    CMP?
    Choose all correct answers:
    1. Abstract accessor methods should not be exposed in the EJB
    component's interface
    2.Abstract accessor/mutator methods are used to access and modify
    persistent state and relationship information for entity objects
    3.Abstract Accessor/Mutator methods do not throw exceptions
    4.The EJB developer must implement the Accessor/Mutator methods
    5.Abstract accessor methods may or may not be exposed in the EJB
    component's interface
    2.Which ONE of the following is true?
    Choose the best answer:
    1.Local interfaces cannot have a relationship with other Entity
    components
    2.Local interfaces cannot be used for Stateless Session EJB
    3.Local interfaces can be a part of Object's persistent state
    4.Local interfaces have the same functionality as that of a
    stateless Session EJB
    3.Which of the following describe the <cmr-field> in a EJB 2.0
    descriptor?
    Choose all correct answers:
    1.A Local interface/Entity can be a value of a <cmr-field>
    2.There is no <cmr-field> in EJB 2.0 descriptor
    3.It is used to represent one meaningful association between any
    pair of Entity EJBs, based on the business logic of the Application
    4.It provides a particular mapping from an object model to a
    relational database schema
    5.It allows the Local Entity interfaces to participate in
    relationships
    4.Which of the following are the advantages of using Local interfaces
    instead of dependent value classes?
    Choose all correct answers:
    1.Local Entity Interfaces can participate in Relationships
    2.The life cycle of Local Entity Interfaces is managed by EJB
    container, intelligently
    3.Local Entity Interfaces can be used in EJB QL Queries
    4.Local Entity Interfaces can be a part of the <cmp-field> but not
    <cmr-field>
    5.Which of the following are true about Local interfaces
    1.A local interface must be located in the same JVM to which the EJB
    component is deployed
    2.Local calls involve pass-by-reference.
    3.The objects that are passed as parameters in local interface
    method calls must be serializable.
    4.In general, the references that are passed across the local
    interface cannot be used outside of the immediate call chain and must
    never be stored as part of the state of another enterprise bean.
    6.Which of the following specifies the correct way for a client
    to access a Message driven Bean?
    Choose the best answer:
    1. via a Remote interface
    2. via Home interface
    3. Message driven bean can be accessed directly by the client
    4. both 1 & 2
    5. none of the above
    ------------------------------------------------------------------------7.Which of the following statements are true about message-driven
    bean Clients?
    ------------------------------------------------------------------------Choose all correct answers:
    They can create Queue and QueueConnectionFactory objects
    They can create Topic and TopicConnectionFactory objects
    They can lookup the JNDI server and obtain the references for
    Queue and Topic and their connection Factories
    Only 1 and 2 above

    Hi guys I'm beginner to EJB and i got some unanswered
    questions.
    Can any one of you please.. give answers?
    Thanks if you do...
    Which of the following are true about abstract methods
    in EJB 2.0
    CMP?
    Choose all correct answers:
    1. Abstract accessor methods should not be exposed
    d in the EJB
    component's interfacefalse
    2.Abstract accessor/mutator methods are used to
    access and modify
    persistent state and relationship information for
    entity objectstrue
    >
    3.Abstract Accessor/Mutator methods do not throw
    exceptionstrue
    >
    4.The EJB developer must implement the
    Accessor/Mutator methodsfalse
    5.Abstract accessor methods may or may not be exposed
    in the EJB
    component's interfacetrue
    2.Which ONE of the following is true?
    Choose the best answer:
    1.Local interfaces cannot have a relationship with
    other Entity
    componentsfalse
    2.Local interfaces cannot be used for Stateless
    Session EJBfalse
    3.Local interfaces can be a part of Object's
    persistent statefalse
    4.Local interfaces have the same functionality as
    that of a
    stateless Session EJBtrue
    3.Which of the following describe the <cmr-field> in a
    EJB 2.0
    descriptor?
    Choose all correct answers:
    1.A Local interface/Entity can be a value of a
    <cmr-field>true
    2.There is no <cmr-field> in EJB 2.0 descriptorfalse
    3.It is used to represent one meaningful association
    between any
    pair of Entity EJBs, based on the business logic of
    the Applicationtrue
    4.It provides a particular mapping from an object
    model to a
    relational database schematrue
    5.It allows the Local Entity interfaces to
    participate in
    relationshipstrue
    4.Which of the following are the advantages of using
    Local interfaces
    instead of dependent value classes?
    Choose all correct answers:
    1.Local Entity Interfaces can participate in
    Relationshipsis
    2.The life cycle of Local Entity Interfaces is
    managed by EJB
    container, intelligentlyis
    3.Local Entity Interfaces can be used in EJB QL
    Queriesnot
    4.Local Entity Interfaces can be a part of the
    <cmp-field> but not
    <cmr-field>not
    >
    >
    5.Which of the following are true about Local
    interfaces
    1.A local interface must be located in the same JVM
    M to which the EJB
    component is deployedtrue
    2.Local calls involve pass-by-reference.true
    3.The objects that are passed as parameters in local
    l interface
    method calls must be serializable.false
    4.In general, the references that are passed across
    s the local
    interface cannot be used outside of the immediate
    e call chain and must
    never be stored as part of the state of another
    r enterprise bean.true
    >
    6.Which of the following specifies the correct way for
    a client
    to access a Message driven Bean?
    Choose the best answer:
    1. via a Remote interfacefalse
    2. via Home interfacefalse
    3. Message driven bean can be accessed directly by
    the clientfalse
    4. both 1 & 2false
    5. none of the abovetrue.
    >
    ----------------7.Which of the following statements
    are true about message-driven
    bean Clients?
    ----------------Choose all correct answers:
    They can create Queue and QueueConnectionFactory
    objectsthe container can, dunno bout clients
    >
    They can create Topic and TopicConnectionFactory
    objectsthe container can, dunno bout clients
    >
    They can lookup the JNDI server and obtain the
    references for
    Queue and Topic and their connection Factories
    true
    Only 1 and 2 abovefalse
    somebody correct me if i'm wrong

  • Hi, I did an apple account but they didn't asked me about payment methods and now when i need something from Appstore it is written: "this apple id has not yet been used in the iTunes Store" tap reviem. I tapped review and they are asking me to introduce,

    Hi I have created an apple Id but yhey didn't asked me about paymeny methods, and know when i need something from appstore it is written: This apple Id not yet been used in the iTunes Store, tap review....but when i tap review they ask me for a credit card without giving me the opption of ''NONE''. Can you help me?

    What kinda forum is this where nobody helps!
    I am waiting since so many days after leaving a thread and till nobody helped me with a reply.
    If it's a Google PlayStore forum many hundreds of people would have replied.
    Seeking a little help and nobody bothered to give it out to you, I am really annoyed.
    Still waiting for Help!

  • Misunderstanding about abstract methods

    I think my compiler just taught me something, and after reading the JLS I concluded that I had a misconception about abstract methods. However, if someone could confirm this I would feel more comfortable.
    I had defined a class structure like so:public abstract class Grandpa{
      public abstract void do();
    public abstract class Pa extends Grandpa {
      public void do(){
      // whatever
    public class Child extends Pa {
    }I got a compile error indicating that Child must implement do(). I had thought that since there was an implementation provided by Pa that Child didn't need to supply one, but I guess I was wrong. Right? :-)

    Nested where? Inside Pa? Other? Static?Inside Pa.
    It sounds like you're satisfied, but if you want to
    continue the discussion, I'll make the standard
    request. Come on, you know it, say it with me: Provide
    a small, complete, working (in that it doesn't
    compile) example that demonstrates this. :-)Yeah, that's exactly what I was working on for the bug report, but I can't get the compile error in my small example. Argh! I'll have to go back some time and build it up to match the other classes until I get the error, because I still get it consistently with the real thing. I have no idea what the key factor is, though - I've tried everything obvious and I don't have time to work through it right now.
    No prob. It's a pleasant break from arguing with UJ.
    :-)Glad I could offer you a distraction. :-) I'll post here again if I ever figure out what the deal is.

  • About abstract method read() in class InputStream

    I would like to know if behind the method
    public abstract int read() throws IOException
    in the abstract class InputStream there is some code that
    is called when I have to read a stream. In this case where can I find
    something about this code and, if is written in other languages, why
    is not present the key word native?
    Thanks for yours answers and sorry for my bad english.

    Ciao Matteo.
    Scusa se ti rispondo in ritardo... ma ero in pausa pranzo.
    Chiedimi pure qualcosa di pi? specifico e se posso darti una mano ti rispondo.
    Le classi astratte sono utilizzate per fornire un comportamento standard lasciando per? uno o pi? metodi non implementati... liberi per le necessit? implementative degli utilizzatori.
    Nel caso specifico la classe InputStream ? una classe astratta che lascia non implementato il metodo read(). Tu nel tuo codice non utilizzerai mai questa classe come oggetto, ma nel caso specifico una sua sottoclasse che ha implementato il metodo read().
    Se vai nelle api di InputStream vedrai che ci sono diverse sottoclassi che estendono InputStream. Guarda ad esempio il codice di ByteArrayInputStream: in questa classe il metodo read() non ? nativo ma restituisce un byte appartenente al suo array interno.
    I metodi nativi (ad esempio il metodo read() della classe FileInputStream) non hanno implementazione java ma fanno invece riferimento a delle chiamate dirette al sistema operativo.
    Per quanto riguarda la classe FilterInputStream di cui parlavi: essa nel suo costruttore riceve un InputStream. Questo significa che si deve passare nel costruttore non la classe InputStream (che ? astratta) ma una classe che la estende e che quindi non sia astratta. Il motivo per il quale FilterInputStream faccia riferimento a una classe di tipo InputStream al suo interno, ? che in java gli stream di input e di output possono essere composti l'uno sopra l'altro per formare una "catena" (a tal proposito vedi per maggiori dettagli uno dei tani articoli che si trovano in rete.... ad esempio ti indico questo http://java.sun.com/developer/technicalArticles/Streams/ProgIOStreams/). Comunque per dirla in due parole: tu puoi voler usare un FileInputStream per leggere un file, ma se hai bisogno di effettuare una lettura pi? efficiente (quindi bufferizzata) puoi aggiungere in catena al FileInputStream un oggetto di tipo FilterInputStream (nel caso specifico un BufferedInputStream che non ? altro che una sottoclasse di FilterInputStream).
    Spero di aver chiarito qualche tuo dubbio!
    Ciao
    Diego

  • Important question to Steve about passivateState() method

    <br> <font size="2">Hello Steve, <br><br>I want to store information about application user in oracle.jbo.Session hastable. It's stored as pair KEY --&gt; VALUE. To be sure that these informations will be accessible after passivation AM I have overreaded passivateState() method as below: <br><br></font><font style="color: rgb(0, 0, 255);" size="2"><span style="font-family: Courier New;">public void passivateState(Document doc, Element parent){  <br>    Node nodeUserData = doc.createElement("USERDATA");<br>    Hashtable hs = getDBTransaction().getSession().getUserData();<br><br>    if(hs != null){ <br><br>        Set mapKeys = hs.keySet(); <br>        Iterator hsKeysIter = mapKeys.iterator(); <br>        while(hsKeysIter.hasNext()){<br>     <br>            String key = (String)hsKeysIter.next(); <br>            Node keyNode = doc.createElement(key);<br>            <span style="color: rgb(255, 0, 0);">keyNode.setTextContent(hs.get(key));</span><br>            <span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 255);">nodeUserData.appendChild(keyNode);</span> </span><br>        } <br>    } <br>    parent.appendChild(nodeUserData); <br>} <br><br></span></font><font size="3"><font size="2">I can't compile this because i get an following error in red line: <span style="color: rgb(255, 0, 0);">Error(122,25): method setTextContent(java.lang.Object) not found in interface org.w3c.dom.Node.</span> It's very strange because <span style="font-weight: bold;">org.w3c.dom.Node</span> implements <span style="font-weight: bold;">setTextContent()</span> method. I have tried this solutions creating standalone xml file and everything works. <span style="font-weight: bold;">It doesn't work inside passivateState() method.</span> Is this another way to save to ADF xml document pair KEY --&gt; VALUE. It's important because I could retrieve user data after activation AM overreading activateState() method and set it into hashtable also as pair KEY --&gt; VALUE. </font><br><br><font size="2">Regards <br>Kuba</font></font>

    Please see section "28.5 Managing Custom User Specific Information" of the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html for more information on this.
    Rather than trying to set the text content of a DOM element, you create an element, create a text node, then append the text node as a child of the element.

  • Newbie question about abstract methods

    hey, I'm working on a web application that I was given and I'm a little confused about
    some of the code in some of the classes. These are some methods in this abstract class. I don't understand
    how this post method works if the method it's calling is declared abstract. Could someone please tell me how this works?
        public final Representation post(Representation entity, Variant variant) throws ResourceException {
            prePostAuthorization(entity);
            if (!authorizeGet()) {
                return doUnauthenticatedGet(variant);
            } else {
                return doAuthenticatedPost(entity, variant);
    protected abstract boolean authorizeGet();Thanks
    Edited by: saru88 on Aug 10, 2010 8:09 PM

    Abstract Methods specify the requirements, but to Implement the functionality later.
    So with abstract methods or classes it is possible to seperate the design from the implementation in a software project.
    Abstract methods are always used together with extended classes, so I am pretty sure that you are using another class.
    Btw: Please post the Code Keyword in these brackets:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

  • About paintComponent method

    Hello,
    I am using swing to develop an user interface for a medium-complex program. Here is the code in the paintComponent method:
    public void paintComponent (Graphics g) {
            Graphics2D g2 = (Graphics2D)g;
            super.paintComponents(g2);
            if (frame.m == null)
                System.out.println("Es null main");
            else {
                System.out.println("No es null main");
               Vector clusters = frame.m.obtenerClusters();
                Iterator it = clusters.iterator();
                while (it.hasNext()) {
                    Cluster c = (Cluster)it.next();
                    Punto p = c.obtenerCoordinador();
                    Color color = c.obtenerColor();
                    Vector sen = c.obtenerSensores();
                    Iterator itS = sen.iterator();
                    while (itS.hasNext()) {
                       Sensor s = (Sensor)itS.next();
                       dibujarSensor(g2, s, color);
                    if (p != null) {
                        dibujarCoordinador(g2, p, color);
                        if (frame.isSelectedDibujarCirculo()) {
                            dibujarCirculoMinimo(g2, c.obtenerCoordinador(), c.obtenerRadio(), color);
                NodoSink s = frame.m.obtenerSink();
                if (s != null) {
                  dibujarSink(g2,s);
        }Every time that this method is called (by me using repaint() or by the virtual machine), the program needs to "walk" over the hole Vector structure and paint again and again the same things, which is very inefficient.
    There are some way to avoid it? I'm worry about it because the Vector structure is commonly very long.
    Thanks!

    Create a BufferedImage and do the custom painting on the BufferedImage.
    If your painting is relatively static then you could create an ImageIcon from the BufferedImage and add the icon to a label and add the label to the GUI. If you need to change the custom painting then you would need to recreate the icon and update the image.
    If you painting is relatively dynamic, then you just change the paintComponent() method to draw the buffered image.

  • Doubt: About synchronized methods?

    Hi,
    Can any one let me know, Is there any difference between static and non-static synchronized methods? If yes, what is the difference?

    One is static and one isn't. What did you think?
    As I recall, non-static methods lock on the object, whereas static methods lock on the class object, if that's what you're wondering about.

  • About   GET Method

    Please, Can U tell me the Maximum size of URL for Get and Post method.
    Its urgent..
    Thanks in advance..

    Have you heard of Google? http://www.google.com/search?q=limit+for+get+url+data
    The GET limit depends on the User Agent but if you're worried about crossing the upper limit, use POST instead. Older browsers supported a max of 255 chars while newer ones go upto 1k or more but it's not recommended to depend on this.
    POST details are given in the links below.
    Read these: http://classicasp.aspfaq.com/forms/what-is-the-limit-on-querystring/get/url-parameters.html
    http://www.velocityreviews.com/forums/t156098-is-there-a-size-limit-of-form-data-that-can-be-submitted.html
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Need opinions about using methods in-line

    Hello fellow SDNers,
    I have this piece of code where i use functional method as operand, string formatting options in-line et al. A friend of mine says it's not too descriptive.
      cl_demo_output=>display_text( |Laufzeit: { lcl_calc_laufzeit=>main(
                                                     im_date_from = p_begda
                                                     im_date_to   = p_endda )-count ALIGN = LEFT } Monat(e)| ).
    Is Too-little is just too confusing?
    I like in-line data declarations, functional methods because i feel they are more intuitive.
    What are your ideas/opinions about it?
    BR,
    Suhas

    Hi Suhas,
    when i was starting with C-programming, i was impressed by what you could achieve with just so little of actual coding.
    I thougt it was quite cool, when I managed to squeeze whole programs into just a few lines, using heavily nested ternary operators and for-loops.
    Well, they did what they where meant to do, but when after a while i had to alter one only gradually, it took me some time to rethink, what i myself had created not so long ago.
    Imagining how someone else would try to follow my line of thought, i came to the conclusion, that it was not so desireable, to squeeze the last bit of efficiency out of the characters that built the source-code, but that it could be far better, to enfold it, make it bigger, even less elegant, but allthemore easier to understand.
    Why do i tell you this?
    I seem to recognize a bit of the fascination, i felt myself, in your code sample. Letting you beeing carried away by possibility alone, does not necessarily lead to the best results on the long run.
    Back to your question - i'm afraid, your friend was right.
    You can do better, without loosing to much.
    Truth be told, i haven't done too much in the line of string templates and nested method calls yet.
    I have to admit, i'm challenged even to follow, what your sample exactly does. Nevertheless, i will dig in and discover whatever it may provide for me .
    Best regards - Jörg

  • Basic Cryptography Question about Cryptograpic Methodes

    Hi
    I have some text data that i need to encrypt and save to a file (kind of a licence file). Than that file is distributed with the software. Upon runtime the software should be able to read in that crypted data file and decrypt it so it can read the information for use.
    I know how this is done using DES for example. But with DES i have to distribute the DES Key with the software, so everbody could use that key to create new encrypted data files.
    What i'm looking for is something like a key i can use to encrypt the data and another key that can only be used to decrypt the data but not for encrypting it, so i can destribute that key with the software with out the danger that anybody can use that key to create new data (licence) files.
    Is there a cryptography mehtode to do this? If yes, is that methode available in JCE?
    I'm a newbie to crypthography, i just read little about the basic concepts, so i'm very thankful about your help.

    I'm not sure whether i understand what you mean. I don't see a reason why i have to exchange any kind of data with the client.
    i thought i package the public key and the encrypted data file with the software i distribute. Than, upon runtime the software loads the public key (as a serialized object) and the encrypted data file and decryptes the data file.
    But this just fits my needs, if the public key may just be used to decrypt the crypted data file and not for encryption. I'm a little bit confused about this point, because i read a lot in the past hours about this topic and the statement was, that private keys are used to decrypt and public keys are used to encrypt. So what i need is the opposite. And i couldn't find such an algorithm until know.
    Maybe you can help me to see that a little bit clearer?
    Thanks a lot for your help!

Maybe you are looking for

  • Xserve RAID not responding

    All of the sudden my Xserve RAID is not responding. It does not seem to be turned on, though when I press the button with the speaker icon, a light appears. Nothing has been unplugged, or at least not that I can tell (I'm working on a complicated edi

  • Thumbnail or "Icon View" on Retina not rendered correctly.

    The Icon View in the Finder does not render the icon images correctly on Retina Macs. You can tell best when setting the viewing size to 32x32 or 16x16, especially when you compare the same viewing size while in List View. I was hoping that Yosemite

  • My iTunes match not working on my iPhone.  Anyoine able to access theirs on an iPhone?

    I was informed by an Apple representative that match won't yet work with ios devices becuase it is still in beta testing.  Has anyone got itunes match to work with their iphone? 

  • Converting to RoboHelp from other source file materials (HelpScribble and PowerPoint)

    I am recommending RoboHelp as the help authoring software for a suite of applications that I am documenting.  Currently they are documented (kind of) in a mishmash of Help Scribble and PowerPoint presentations. Is there an easy way (relatively;) to c

  • Error rep-1352

    Problem : REP-1352: The fonts specified for this report cannot be found for the character set specified by NLS_LANG. Secene : I am getting this runtime error after 3 years of usage only in a particular client. (This report works fine with other clien