@@ -0,0 +1,2197 @@
+package com.company;%0Aimport com.sun.xml.internal.ws.commons.xmlutil.Converter;%0A%0Aimport javax.xml.crypto.Data;%0Aimport java.sql.Timestamp;%0Aimport java.util.*;%0A%0Apublic class UpdateJson  %7B%0A    private String CONSUMER_KEY;%0A    private String CONSUMER_KEY_SECRET;%0A    private String ACCESSTOKEN;%0A    private String ACCESSSECRET;%0A%0A    static final String TwitterApiBaseUrl = %22https://api.twitter.com/1.1/%22;%0A    public Timestamp timestamp;%0A%0A    byte%5B%5DsignatureHash;%0A%0A    TwiAPIGetToken GetToken=new TwiAPIGetToken();%0A%0A    public UpdateJson(String CONSUMER_KEY,String CONSUMER_KEY_SECRET,String ACCESSTOKEN,String ACCESSSECRET)%7B%0A        this.CONSUMER_KEY=CONSUMER_KEY;%0A        this.CONSUMER_KEY_SECRET=CONSUMER_KEY_SECRET;%0A        this.ACCESSTOKEN=ACCESSTOKEN;%0A        this.ACCESSSECRET=ACCESSSECRET;%0A%0A        try %7B%0A            signatureHash = CONSUMER_KEY_SECRET.getBytes(%22US-ASCII%22);%0A            signatureHash =ACCESSSECRET.getBytes(%22US-ASCII%22);%0A        %7D%0A        catch (Exception e)%7B%0A            e.printStackTrace();%0A            return;%0A        %7D%0A    %7D%0A  public String tweet(String Text) %7B%0A      Map%3CString,String%3Edata=new Hashtable%3C%3E();%0A      data.put(%22status%22,Text);%0A      data.put(%22trim_user%22,%221%22);%0A      return SendRequest(%22statuses/update.json%22, data);%0A     %7D%0A  public String SendRequest(String URL,Map%3CString,String%3Edata)%7B%0A      String full_url=TwitterApiBaseUrl+URL;%0A      TwiAPIGetToken twiAPIGetToken=new TwiAPIGetToken();%0A%0A      data.put(%22oauth_consumer_key%22, twiAPIGetToken.getCONSUMER_KEY());%0A      data.put(%22oauth_signature_method%22, %22HMAC-SHA1%22);%0A      data.put(%22oauth_timestamp%22, timestamp.toString());%0A      data.put(%22oauth_nonce%22, GenerateNonce());%0A      data.put(%22oauth_token%22, twiAPIGetToken.getACCESSTOKEN());%0A      data.put(%22oauth_version%22, %221.0%22);%0A      data.put(%22oauth_signature%22, GenerateSignature(full_url, data));%0A%0A      return SendRequest(full_url,data,formData);%0A  %7D%0A  String GenerateSignature(String URL,Map%3CString,String%3Edata)%7B%0A      String signature=String.join(%22&%22 );%0A      signature.format(%22%7B0%7D=%7B1%7D%22);%0A      %0A  %7D%0A    static String GenerateNonce()%7B%0A        Random rnd =new Random();%0A        int val;%0A        val=rnd.nextInt(123400);%0A        return rnd.toString();%0A    %7D%0A%7D%0A

Create UpdateJson.java