How to change long - int ?

i have a retrieved a long " long koko = files.length(); " witch i need to represent in integer for "fis.read(id3test, koko, 20);" if someone could help me i would really be glad.... ... thanks in advance.

well, you can simply cast it
long thelong = 123456;
int a = (int)thelong;
But in this way you will loose the half of the bytes, so if the long value is bigger than Integer.MAX_VALUE, you will have perhaps strange or unwanted results, so be patient.

Similar Messages

  • How to Change Long Text Font Size

    Hi experts,
    I'm working on a standard sapscript form and a standard print program.
    In the print program, there's PERFORM LONG_TEXT.
    so in my form, the long text appear with other font size and font type.
    my question is, how can I change the font size and font type for the long text ?
    so that the long text can hv same font size n font type togehter with other text in my sapscript form?
    Please advise, Thank you.

    Hi,
    First findout the Paragraph format of the text to wich you need to change font size and font type.
    go to the particular window where the font size and type should be changed.
    go to text elements of that window(F9)
    Then change the editor Goto->Change editor
    In the first column give the paragraph format name.
    Activate.
    Regards
    Madhu G S
    Reward points if usefull

  • How to change Long Text of Infoset

    Hi Friends ,
    In one of the infoset I created ,I typed wrong text while creating.
    Can you please help me to change the text .
    Thanks & Regards,
    Praveen

    hi Praveen,
    try RSISET, edit infoset, and menu 'go to' - global properties.
    hope this helps.

  • How to change the waveform-type inside of the waveform graph from int to double?

    Hello,
    attached you find a vi with two waveform-graphs.
    When i rightclick them and select "create constant" then it creates the constant.
    The difference between the two graphs is, that one creates a double-array inside the constant and the other graph creates an int-array inside
    The question is: Where can i change inside of the int-graph that it also creates a double-array in the constant?
    (Problem is that all double-waveforms send into this graph are changed to int and rounded in the display)
    Thanks for the help
    Attachments:
    waveform.vi ‏27 KB

    The datatype of a chart or graph is determined by the last thing you wired to it.  By default, they are simple doubles or arrays of doubles.  My guess is that you first wired a waveform with an integer data type to the graph.  It should switch automatically to a double waveform graph if you wire a waveform which contains double data to it.  If it does not, that is probably a bug.  If you have a VI in this state, please post it and I will report it to R&D.
    Thanks!
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How to change the long in to string

    Hi
    In my program i get the long value as input.
    Then i send this long value to one method for testing which accepts the argument as String.So i have to change my long in to string then i pass it to the method.
    can anybody tell me how to change my long in to string?
    Thank you so much

    There's probably a method java.lang.Long.toString.
    If not, there's probably something a lot like it in either the Long or String classes.
    I'll leave you the pleasure of looking it up in the API docs.

  • How to change double to int?

    i got a double
    double x
    x = 3 * 1.2
    how to change x to int type?
    thx a lot

    You can't change x, it's declared as type double.
    You can retrieve the value of x as an int by using a cast:
    int y = (int) x;

  • Help!!!!!  anyone know how to change a Double to an int??

    Help!!!!! anyone know how to change a Double to an int?? for use in an array[int].

    I don't know why would you want to depend on a double value to build your array but programmatically just use plain old cast: i = (int) double_value;
    Keep in mind though, the integer value will be truncated.

  • How do I change the default apple ID that's displayed when buying or updating apps? Mine is defaulting to a no-longer-existing ID, and I don't know how to change it.

    How do I change the default apple ID that's displayed when buying or updating apps? It's currently defaulting to a no-longer-existing ID, and I don't know how to change it.

    Any apps you purchased with the no-longer-existing ID will always have to be updated with the password to that account, you cannot merge account purchases.
    To change to your new account go to Settings > Store > Apple ID: and put in the one you want to use.

  • Viewc32 is changing long to int when creating view.java

    I have copied the view and the java code generated from the view by viewc32. In the view field <b>oszStartTime </b>is a long. In java it is represented as a int. The .h file is a long. Is this the way it is suppose to work? I thought the .java file would represent the field as a long. I have created about 4 views and this is consistent for all of them. All longs are changed to ints in the .java programs.
    Thanks for the help...
    Here is my view
    VIEW GetEqmhistView
    #type     cname     fbname     count     flag     size     null
    string     iReqName     -     1     -     30     -
    string     iMsgName     -     1     -     30     -
    short     iMsgVersion     -     1     -     -     0
    string     iszTrainSection     -     1     -     2     -
    string     iszTrainSymbol     -     1     -     8     -
    string     iszTrainDay     -     1     -     3     -
    short     onSiteNumber     -     100     -     -     0
    long     <b>oszStartTime     </b>-     100     -     -     0
    char     ocSiteKind     -     100     -     -     \0
    char     oReserved     -     100     -     -     \0
    long     omdwReturnStatus     -     1     -     -     0
    long     omdwErrorCode     -     1     -     -     0
    string     omszErrorMessage     -     1     -     256     -
    END
    Here is the Java Generated:
    package com.nscorp.apps.util;
    import java.io.*;
    import java.lang.*;
    import weblogic.wtc.jatmi.*;
    import weblogic.wtc.jatmi.Utilities;
    public class GetEqmhistView extends TypedView32 implements Serializable {
    private String iReqName = null;
    private String iMsgName = null;
    private short iMsgVersion = 0;
    private String iszTrainSection = null;
    private String iszTrainSymbol = null;
    private String iszTrainDay = null;
    private short[] onSiteNumber = null;
    private int[] <b>oszStartTime </b>= null;
    private char[] ocSiteKind = null;
    private char[] oReserved = null;
    private int omdwReturnStatus = 0;
    private int omdwErrorCode = 0;
    private String omszErrorMessage = null;
    private boolean _associatedFieldHandling = false;
    public GetEqmhistView() {
    super("GetEqmhistView");
    this.onSiteNumber = new short[100];
    this.oszStartTime = new int[100];
    this.ocSiteKind = new char[100];
    this.oReserved = new char[100];
    return;
    * Gets the current state of associated field handling.
    * @return the current state (true=on, false=off)
    public boolean getAssociatedFieldHandling()
    return _associatedFieldHandling;
    * Sets the state of associated field handling.
    * @param state the desired state (true=on, false=off)
    public void setAssociatedFieldHandling(boolean state)
    _associatedFieldHandling = state;
    * Gets the value of the iReqName element of this view
    * @return The value which this element has
    public String getiReqName()
    return(this.iReqName);
    * Sets the value of the iReqName element of this view
    * @param value The value to set the element to
    * @throws IllegalArgumentException if the value is too long
    public void setiReqName(String value)
    if (value.length() > 30)
    throw new IllegalArgumentException("Data too large for iReqName");
    this.iReqName = value;
    * Gets the value of the iMsgName element of this view
    * @return The value which this element has
    public String getiMsgName()
    return(this.iMsgName);
    * Sets the value of the iMsgName element of this view
    * @param value The value to set the element to
    * @throws IllegalArgumentException if the value is too long
    public void setiMsgName(String value)
    if (value.length() > 30)
    throw new IllegalArgumentException("Data too large for iMsgName");
    this.iMsgName = value;
    * Gets the value of the iMsgVersion element of this view
    * @return The value which this element has
    public short getiMsgVersion()
    return(this.iMsgVersion);
    * Sets the value of the iMsgVersion element of this view
    * @param value The value to set the element to
    public void setiMsgVersion(short value)
    this.iMsgVersion = value;
    * Gets the value of the iszTrainSection element of this view
    * @return The value which this element has
    public String getiszTrainSection()
    return(this.iszTrainSection);
    * Sets the value of the iszTrainSection element of this view
    * @param value The value to set the element to
    * @throws IllegalArgumentException if the value is too long
    public void setiszTrainSection(String value)
    if (value.length() > 2)
    throw new IllegalArgumentException("Data too large for iszTrainSection");
    this.iszTrainSection = value;
    * Gets the value of the iszTrainSymbol element of this view
    * @return The value which this element has
    public String getiszTrainSymbol()
    return(this.iszTrainSymbol);
    * Sets the value of the iszTrainSymbol element of this view
    * @param value The value to set the element to
    * @throws IllegalArgumentException if the value is too long
    public void setiszTrainSymbol(String value)
    if (value.length() > 8)
    throw new IllegalArgumentException("Data too large for iszTrainSymbol");
    this.iszTrainSymbol = value;
    * Gets the value of the iszTrainDay element of this view
    * @return The value which this element has
    public String getiszTrainDay()
    return(this.iszTrainDay);
    * Sets the value of the iszTrainDay element of this view
    * @param value The value to set the element to
    * @throws IllegalArgumentException if the value is too long
    public void setiszTrainDay(String value)
    if (value.length() > 3)
    throw new IllegalArgumentException("Data too large for iszTrainDay");
    this.iszTrainDay = value;
    * Gets the value of the onSiteNumber element of this view
    * @return The value which this element has
    public short[] getonSiteNumber()
    return(this.onSiteNumber);
    * Gets the value of the onSiteNumber element of this view
    * @param index The element in the array to return
    * @return The value which this element has
    * @throws ArrayIndexOutOfBounds if the array index is out of bounds
    public short getonSiteNumber(int index)
    return(this.onSiteNumber[index]);
    * Sets the value of the onSiteNumber element of this view
    * @param value The value to set the element to
    * @throws ArrayIndexOutOfBounds if the array given is too large
    public void setonSiteNumber(short[] value)
    if (value.length > 100)
    throw new ArrayIndexOutOfBoundsException("Array too large for onSiteNumber");
    if (value.length < onSiteNumber.length)
    for(int i = 0; i < value.length; i++)
    onSiteNumber[i] = value;
    else
    this.onSiteNumber = value;
    * Sets the value of the onSiteNumber element of this view
    * @param value The value to set the element to
    * @param index The element in the array to set
    * @throws ArrayIndexOutOfBounds if the array index is out of bounds
    public void setonSiteNumber(short value, int index)
    this.onSiteNumber[index] = value;
    * Gets the value of the oszStartTime element of this view
    * @return The value which this element has
    public int[] getoszStartTime()
    return(this.oszStartTime);
    * Gets the value of the oszStartTime element of this view
    * @param index The element in the array to return
    * @return The value which this element has
    * @throws ArrayIndexOutOfBounds if the array index is out of bounds
    public int getoszStartTime(int index)
    return(this.oszStartTime[index]);
    * Sets the value of the oszStartTime element of this view
    * @param value The value to set the element to
    * @throws ArrayIndexOutOfBounds if the array given is too large
    public void setoszStartTime(int[] value)
    if (value.length > 100)
    throw new ArrayIndexOutOfBoundsException("Array too large for oszStartTime");
    if (value.length < oszStartTime.length)
    for(int i = 0; i < value.length; i++)
    oszStartTime[i] = value[i];
    else
    this.oszStartTime = value;
    * Sets the value of the oszStartTime element of this view
    * @param value The value to set the element to
    * @param index The element in the array to set
    * @throws ArrayIndexOutOfBounds if the array index is out of bounds
    public void setoszStartTime(int value, int index)
    this.oszStartTime[index] = value;
    * Gets the value of the ocSiteKind element of this view
    * @return The value which this element has
    public char[] getocSiteKind()
    return(this.ocSiteKind);
    * Gets the value of the ocSiteKind element of this view
    * @param index The element in the array to return
    * @return The value which this element has
    * @throws ArrayIndexOutOfBounds if the array index is out of bounds
    public char getocSiteKind(int index)
    return(this.ocSiteKind[index]);
    * Sets the value of the ocSiteKind element of this view
    * @param value The value to set the element to
    * @throws ArrayIndexOutOfBounds if the array given is too large
    public void setocSiteKind(char[] value)
    if (value.length > 100)
    throw new ArrayIndexOutOfBoundsException("Array too large for ocSiteKind");
    if (value.length < ocSiteKind.length)
    for(int i = 0; i < value.length; i++)
    ocSiteKind[i] = value[i];
    else
    this.ocSiteKind = value;
    * Sets the value of the ocSiteKind element of this view
    * @param value The value to set the element to
    * @param index The element in the array to set
    * @throws ArrayIndexOutOfBounds if the array index is out of bounds
    public void setocSiteKind(char value, int index)
    this.ocSiteKind[index] = value;
    * Gets the value of the oReserved element of this view
    * @return The value which this element has
    public char[] getoReserved()
    return(this.oReserved);
    * Gets the value of the oReserved element of this view
    * @param index The element in the array to return
    * @return The value which this element has
    * @throws ArrayIndexOutOfBounds if the array index is out of bounds
    public char getoReserved(int index)
    return(this.oReserved[index]);
    * Sets the value of the oReserved element of this view
    * @param value The value to set the element to
    * @throws ArrayIndexOutOfBounds if the array given is too large
    public void setoReserved(char[] value)
    if (value.length > 100)
    throw new ArrayIndexOutOfBoundsException("Array too large for oReserved");
    if (value.length < oReserved.length)
    for(int i = 0; i < value.length; i++)
    oReserved[i] = value[i];
    else
    this.oReserved = value;
    * Sets the value of the oReserved element of this view
    * @param value The value to set the element to
    * @param index The element in the array to set
    * @throws ArrayIndexOutOfBounds if the array index is out of bounds
    public void setoReserved(char value, int index)
    this.oReserved[index] = value;
    * Gets the value of the omdwReturnStatus element of this view
    * @return The value which this element has
    public int getomdwReturnStatus()
    return(this.omdwReturnStatus);
    * Sets the value of the omdwReturnStatus element of this view
    * @param value The value to set the element to
    public void setomdwReturnStatus(int value)
    this.omdwReturnStatus = value;
    * Gets the value of the omdwErrorCode element of this view
    * @return The value which this element has
    public int getomdwErrorCode()
    return(this.omdwErrorCode);
    * Sets the value of the omdwErrorCode element of this view
    * @param value The value to set the element to
    public void setomdwErrorCode(int value)
    this.omdwErrorCode = value;
    * Gets the value of the omszErrorMessage element of this view
    * @return The value which this element has
    public String getomszErrorMessage()
    return(this.omszErrorMessage);
    * Sets the value of the omszErrorMessage element of this view
    * @param value The value to set the element to
    * @throws IllegalArgumentException if the value is too long
    public void setomszErrorMessage(String value)
    if (value.length() > 256)
    throw new IllegalArgumentException("Data too large for omszErrorMessage");
    this.omszErrorMessage = value;
    public void _tmpresend(DataOutputStream encoder)
    throws TPException, IOException {
    int lcv;
    try {
    Utilities.xdr_encode_string_length(encoder,iReqName, 30);
    Utilities.xdr_encode_string_length(encoder,iMsgName, 30);
    encoder.writeInt(iMsgVersion);
    Utilities.xdr_encode_string_length(encoder,iszTrainSection, 2);
    Utilities.xdr_encode_string_length(encoder,iszTrainSymbol, 8);
    Utilities.xdr_encode_string_length(encoder,iszTrainDay, 3);
    for (lcv = 0; lcv < 100; lcv++) {
    encoder.writeInt(onSiteNumber[lcv]);
    for (lcv = 0; lcv < 100; lcv++) {
    encoder.writeInt(oszStartTime[lcv]);
    for (lcv = 0; lcv < 100; lcv++) {
    encoder.writeInt((int)ocSiteKind[lcv]);
    for (lcv = 0; lcv < 100; lcv++) {
    encoder.writeInt((int)oReserved[lcv]);
    encoder.writeInt(omdwReturnStatus);
    encoder.writeInt(omdwErrorCode);
    Utilities.xdr_encode_string_length(encoder,omszErrorMessage, 256);
    catch (IOException ie) {
    System.out.println("Error encoding view buffer: " + ie);
    return;
    public void tmpostrecv(DataInputStream decoder, int recvsize)
    throws TPException, IOException {
    int lcv;
    iReqName = Utilities.xdr_decode_string(decoder, null);
    iMsgName = Utilities.xdr_decode_string(decoder, null);
    iMsgVersion = (short)decoder.readInt();
    iszTrainSection = Utilities.xdr_decode_string(decoder, null);
    iszTrainSymbol = Utilities.xdr_decode_string(decoder, null);
    iszTrainDay = Utilities.xdr_decode_string(decoder, null);
    for (lcv = 0; lcv < 100; lcv++) {
    onSiteNumber[lcv] = (short)decoder.readInt();
    for (lcv = 0; lcv < 100; lcv++) {
    oszStartTime[lcv] = decoder.readInt();
    for (lcv = 0; lcv < 100; lcv++) {
    ocSiteKind[lcv] = (char)decoder.readInt();
    for (lcv = 0; lcv < 100; lcv++) {
    oReserved[lcv] = (char)decoder.readInt();
    omdwReturnStatus = decoder.readInt();
    omdwErrorCode = decoder.readInt();
    omszErrorMessage = Utilities.xdr_decode_string(decoder, null);
    return;

    Hi Corey,
    The behavior you are seeing is expected. A long in Tuxedo is a 32 bit value. That maps to a Java int data type which is also a 32 bit value.
    Regards,
    Todd Little
    BEA Tuxedo Engineering

  • Is list of custom headers and footers. I can't find how to change the footer to print the Long Date

    '''There should be a list of custom headers and footers.''' I can't find how to change the footer to print the '''Long Date'''. It took awhile just to find Page &PT. So I would appreciate if someone could post a list. Also if someone can answer how to print the Long Date.
    Thank you

    When you're on a call, use the volume buttons on the left side of the device.  This will then adjust the In-Call Volume.

  • How to open "change long text" editor on a button click

    Hi,
    I have 4 long text boxes alligned vertically and a button beside them on a screen.
    My client has the following requirement:
    -- When this button is clicked, a "change long text" editor should open, the user will make his changes here and when back button is clicked, all the information in the editor should get transferred to the 4 text boxes.
       (the functionality should to similar to the big custom control box and the "Create Text" button beside it (in the Subject block) in IW52 transaction except that the custom control should be replaced with the 4 Text boxes).
    Please help, How could I achieve this?

    Cheacked the SAP given programs / pakages and solved the problem.
    Thanks.

  • I forgot the answers to my security questions so I went to my account to change them, but the email account they send the security info to no longer exists and I don't know how to change it. Can anybody help me?

    I forgot my answers to my security questions so I went to my account to change them, but the email accout that they send all the security info on how to change them no longer exists and I don't know how to change that email with knowing my security question. Can anybody help me?

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (122370)

  • I need to know how to change the identity (email address) used for the iTunes store as I no longer use that email

    I need to know how to change the identity (email address) used for the iTunes store as I no longer use that email.

    Settings > iTunes & App store.
    Tap AppleID, sign out then sign back in.
    The Apple ID is right everywhere else. I've synced the phone. I've reset it in Settings on the phone. I've changed it at Apple.
    When you write, "I've changed it at Apple, this means you updated yoru old AppleID or you ceated a new AppleID?

  • I would like to use iCloud.  However, it is sending the verification email to an address that no longer exists (college email that I used when I set up iTunes the first time).  I can't figure out how to change that so I can get it sent to my appleID email

    Please help me figure out how to change the email that I originally set up so that I can verify my email and use icloud!  Thanks.

    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Use "Manage your Account" to change the primary email address.

  • Does anybody no .... I can't reset my questions for security and I have forgotten the answers I no longer use the email that it sends it to and I don't no how to change it??

    Does anybody no how to change the email address that it sends to reset your passwords because I can't remember my answers for questions

    http://support.apple.com/kb/HT5312
    If you established a rescue email address, there will be a link on the "Passwords & Security" page of id.apple.com.  Clicking the link will send the reset to your rescue email address (NOTE:  This is not the same address as your Apple ID email)
    If there is no link on the page, then you didn't establish a rescue email address.  Contact AppleCare at 800.694.7466, and ask for account security.  You will need to answer some questions to verify your identity, AND you will need access to a computer to generate a temporary support pin.
    HTH

Maybe you are looking for