: how to convert string into uppercase string in java
iam having string in lower case i need to convert it to uppercase using java.please help me
s = s.toUpperCase ();See http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html.
Similar Messages
-
How to convert BLOB into a String
Hi,
I got a blob column from the database.
It contains one XML File.
How to convert it into String.
I need the code for how to convert the blob into String
Thanks in Advance.A blob would be a byte-array, which you can use in the String(byte[]) constructor
-
How to convert hex into a string value
hei evryone!
can anyone please help me on how to convert a hex value into a string suppose.. Example i want to convert 4275646479 which is a hex value, into a string "BUDDY"? how will i do that???
Any suggestion, tutorial site would be appreciated?
Thx!something like this will convert string to byte[]
e.g.
you want to convert following.
656667 => ABC
String toConvert = "656667";
byte[] returnVal = String2byteArr (toConvert );
String FinalStr = new String(returnVal);
public static byte[] String2byteArr(String Result)
byte[] byteRet = new byte[Result.length()/2];
int k=0;
for (int j=0; j<(Result.length()); j+=2)
try
Integer I = new Integer (0);
I = I.decode ("0x"+Result.substring(j, j+2));
int i = I.intValue ();
if (i > 127)
i = i - 256;
byteRet[k++] = new Integer(i).byteValue();
catch(Exception e)
System.err.println(e);
return byteRet;
}// String2byteArr
Hope this will help you, So that i can get 3$ (:-)
Avi -
How to convert byte into string
can any tell me how to convert byte into string
when im an debugging thid code in eclipse it shows the result in integer format instead of string but in command prompt it is showing result in string format..........plz help
package str;
import java.io.*;
public class Testfile {
public static void main(String rags[])
byte b[]=new byte[100];
try{
FileInputStream file=new FileInputStream("abc.txt");
file.read(b,0,50);
catch(Exception e)
System.out.println("Exception is:"+e);
System.out.println(b);
String str=new String(b);
System.out.println(str);
}Namrata.Kakkar wrote:
errors: count cannot be resolved and Unhandled exception type Unsupported Encoding Exception.
If i write an integer value instead of "count" then Unhandled exception type Unsupported Encoding Exception error is left.This is elementary. You need to go back to [http://java.sun.com/docs/books/tutorial/|http://java.sun.com/docs/books/tutorial/] . -
How to convert XML doc to string and vice versa?
Assume I have a XML doc and I want to convert it into a string (and put it into a string variable).
How can I do this?
How can I do the opposite: Convert a string content into a XML doc?
PeterUse:
ParseEscapedXML() and ora:getContentAsString()
See
http://www.codeguru.com/cpp/sample_chapter/article.php/c10789__7/
Marc -
How to convert 1D array of string to string
How to convert 1D array of string to string.
Maximus00, as Pavel indicated, there is a lesser known feature of "Concatenate Strings" that does exactly what your code is doing if the input is an array of strings. In one step! See attached image.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
ConcatenateArray ofStrings.gif 7 KB -
How to convert from military time (string) to regular time?
How to convert from military time (string) to regular time?
First of all I need to let you know I'm very new to Crystal Reports, so I apologize and will need detailed instructions if possible.
I have created a Crystal Report pulling information from the received time field. On the report, the time is showing in military time (ex. 16:00:00).
How can I convert this time to normal time (ex. 4:00:00)
Since the field is a 'String' field and not a 'Time' field, I do not have the option of changing it under the field properties.
I hope someone can help with this.
Thank you in advance.As my fields were date only and not datetime, I ended up using the following,
If IsDate({CallLog.EmailRecdDate}) Then
CDate({CallLog.EmailRecdDate})
Else
CDate(0,0,0)
You answer lead me in the right direction.
I'm still having an issue with the 'Else' statment returning 12:00:00 because of the CDate(0,0,0), but I'm not sure what else I can use to return a blank space on the report. Any ideas?
Thanks again! -
How to convert smartforms into Adobe forms.
Hi......
How to convert smartforms into Adobe forms.
Regards
Anbu BHi,
You need to use the Function Module CONVERT_OTF.
Please check the below code
REPORT zsuresh_test.
Variable declarations
DATA:
w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
w_fmodule TYPE rs38l_fnam,
w_cparam TYPE ssfctrlop,
w_outoptions TYPE ssfcompop,
W_bin_filesize TYPE i, " Binary File Size
w_FILE_NAME type string,
w_File_path type string,
w_FULL_PATH type string.
Internal tables declaration
Internal table to hold the OTF data
DATA:
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
Internal table to hold OTF data recd from the SMARTFORM
t_otf_from_fm TYPE ssfcrescl,
Internal table to hold the data from the FM CONVERT_OTF
T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
This function module call is used to retrieve the name of the Function
module generated when the SMARTFORM is activated
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Calling the SMARTFORM using the function module retrieved above
GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
format of the output
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
" for print preview
w_cparam-getotf = 'X'.
Printer name to be used is provided in the export parameter
OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = w_cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = w_outoptions
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = T_pdf_tab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks,
Ruthra -
SortedSet String into a String[]
Hello, I would like convert a SortedSet< String > into a String[], is it possible?
I would like to do it because I want to do a binary search on it? is it a good way converting it or I can use another way as well?
thanks,mickey0 wrote:
Hello, I would like convert a SortedSet< String > into a String[], is it possible?
I would like to do it because I want to do a binary search on it? is it a good way converting it or I can use another way as well?A SortedSet already does an implicit form of a binary search for you when it has to find an entry in the set.
kind regards,
Jos -
How to convert .class into .jar file
Hi,
How to convert .class into .jar filejsf_VWP5.5.1 wrote:
Hi,
How to convert .class into .jar fileFrom a command prompt, cd to the location of your .class file(s).
If you want to create a simple jar, use: jar -cf Whatever.jar Whatever.class
If you want to compile all .class files in a directory into a jar, use *.class instead.
Now, I'm going to assume you want to create an executable jar... here's how to do that:
1) Create a blank text file; for this example, lets call it main.txt.
2) In the first line of main.txt, type: Main-class: Whatever ('Whatever' should be the name of the class in your program where the main() method is located)
3) Press enter to go to the next line (someone please correct me if I'm wrong, but if you don't insert the line break/CR after the Main-class: statement, this will not work... in my experience, this is true)
4) Make sure you save this file in the same directory as your .class file(s).
5) Type: jar -cmf Whatever.jar main.txt Whatever.class
...and that's about it. For more information on the usage of the jar command and to understand the switches (such as -cmf), try jar --help.
Hope that helps. -
How to convert rows into columns with decode function
Hi,
How to convert rows into columns with the help of decode function in oracle.
thanks and regards
P Prakashsay
col1 col2
1 10
2 20
3 30
then use
select col1,
sum(decode(col2,10,10)) "new1"
sum(decode(col2,20,20))"new2"
sum(decode(col2,30,30))"new3"
from table_name
group by col1;
we used sum u can use ny function if wont u have to give the column name i.e col2 name also
so i think u got it nw
regards -
How to convert files into DAT?
Does anyone know how to convert files into DAT? Not The other way around please.
This might do it:
http://www.videoconverterformac.com/dat-converter-for-mac.html
but can't imagine why you would want to! -
How to convert bytes[] into File object
hi
how to convert byte array into File object
pls.. help me
Regards
srinurrrr007 wrote:
Hi,
How to convert bytes[] into multipage File object?? ]There's no such thing as a "multipage File object." You ought to re-read this thread closely, and read the [API docs for File|http://java.sun.com/javase/6/docs/api/java/io/File.html] to clear up your confusion about what a File object is.
I used the java.io.SequenceInputStream to concatenate two input streams (basically .pdf files) into a single input stream. I need to create a single multipage pdf file using this input stream. Then you need a pdf API, like iText or fop. You can't just concatenate pdf files, word docs, excel sheets, etc., like you can text files. Google for java pdf api. -
How to convert mysql into bekerley db?
i have a mysql database ,there is a table in it ,only have 7 fields:symbol,date,open,high,low,close,vol.
would you mind to tell me how to convert it into bekerley db?Hello,
You can build a drop-in replacement for SQLite by specifying the
--enable-sql_compat flag to Berkeley DB's configure script. This
creates a binary, sqlite3 which has the same interface as SQLite.
The "Getting Started with the Oracle Berkeley DB SQL API" and FAQ
have the details:
http://www.oracle.com/technology/products/berkeley-db/faq/db_faq.html
http://www.oracle.com/technology/documentation/berkeley-db/db/bdb-sql/index.html
Thanks,
Sandra -
How to convert idoc into xml/edifact
hi everyone just now i have started to work on edi, i want to kno how to convert idoc into xml/edifact. plz reply asap
Firstly, I will reply when and if I choose to. I do not require the asap nonsense at the end of your sentence.
EDIFACT - You will need a subsystem.
XML - I am not 100%. It may also depend on what version of SAP you are on. As I do not know if later versions of SAP can convert IDoc to XML.
Maybe you are looking for
-
RMAN success, but errors in alert.log file
My RMAN backup script runs well, but generates errors in alert.log file. Here is the trace file contents: /usr/lib/oracle/xe/app/oracle/admin/XE/udump/xe_ora_3990.trc Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production ORACLE_HOME = /
-
Set Window & Panel Icons For Terminal Programs in Openbox
Hello Arch Linux 64 openbox tint2 ranger fm (example) Perhaps I have not discovered the correct search terms to google this question & I may be just missing the obvious here. My Wife likes to have openbox with a tint2-vertical setup on her laptop. Is
-
When I sign in, my browser shows, "cloud.acrobat.com/convertpdf" and the screen remains blank. Any thoughts?
-
Photoshop Elements 12 editor problem
I have Elements 12 with a valid serial number from purchase. My problem is with getting into the editor. When I click on the editor button, I get a box saying that I can't use the editor until I validate my serial number. I click the validate button,
-
I am installing standalone Oracle Enterprise edition (11.2.0.1) database on OEL 6 (ed Hat Enterprise Linux Server release 6.4) with 2.6.39-400.24.1.el6uek.x86_64 kernel on vmware workstation 9.0.2. I installed grid infrastructure fine and was able to