<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Convert from JAVA to ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-from-java-to-abap/m-p/12113587#M1973750</link>
    <description>&lt;P&gt;Hello, &lt;/P&gt;
  &lt;P&gt;can somebody help me to Translate the JAVA Code into ABAP?&lt;/P&gt;
  &lt;P&gt;I am very new in ABAP and need this for our Company.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;

URI uri = URI.create("http://api.labelary.com/v1/printers/8dpmm/labels/4x6/0/%5Exa%5Ecfa%2C50%5Efo100%2C100%5EfdHello%20World%5Efs%5Exz");
		
HttpRequest request = HttpRequest.newBuilder(uri)
.header("Accept", "application/pdf") // omit this line to get PNG images back
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse&amp;lt; byte[] &amp;gt; response = client.send(request, BodyHandlers.ofByteArray()); 
byte[] body = response.body();
		


if (response.statusCode() == 200) 
{
      File file = new File("C://Users//t.cayli//Desktop//Label//Label.pdf"); 
      Files.write(file.toPath(), body);
      System.out.println("OK");
}
		
else 
{
      String errorMessage = new String(body, StandardCharsets.UTF_8);
      System.out.println(errorMessage);
}
	
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I would be happy for every help and hint.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2019 09:06:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-10-23T09:06:54Z</dc:date>
    <item>
      <title>Convert from JAVA to ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-from-java-to-abap/m-p/12113587#M1973750</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;
  &lt;P&gt;can somebody help me to Translate the JAVA Code into ABAP?&lt;/P&gt;
  &lt;P&gt;I am very new in ABAP and need this for our Company.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;

URI uri = URI.create("http://api.labelary.com/v1/printers/8dpmm/labels/4x6/0/%5Exa%5Ecfa%2C50%5Efo100%2C100%5EfdHello%20World%5Efs%5Exz");
		
HttpRequest request = HttpRequest.newBuilder(uri)
.header("Accept", "application/pdf") // omit this line to get PNG images back
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse&amp;lt; byte[] &amp;gt; response = client.send(request, BodyHandlers.ofByteArray()); 
byte[] body = response.body();
		


if (response.statusCode() == 200) 
{
      File file = new File("C://Users//t.cayli//Desktop//Label//Label.pdf"); 
      Files.write(file.toPath(), body);
      System.out.println("OK");
}
		
else 
{
      String errorMessage = new String(body, StandardCharsets.UTF_8);
      System.out.println(errorMessage);
}
	
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I would be happy for every help and hint.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 09:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-from-java-to-abap/m-p/12113587#M1973750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-23T09:06:54Z</dc:date>
    </item>
  </channel>
</rss>

