This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.ChunkerDeChunker; | |
import java.io.*; | |
import java.util.Random; | |
public class Chunker { | |
private int chunkSize = 20; | |
private static ByteArrayOutputStream res; | |
public void process(String content) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.HTTPServer; | |
import java.io.*; | |
import java.util.List; | |
public class Chunker implements Processor { | |
private int chunkSize = 20; | |
public Chunker(int chunkSize) { | |
this.chunkSize = chunkSize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.yahoo.finance.xml; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.net.HttpURLConnection; | |
import java.net.URL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.JSON; | |
class Adress { | |
private String country; | |
private String city; | |
private String street; | |
public String toString(){ | |
return country +" "+ city +" "+street; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comp.Trains.JAXB; | |
import java.util.Random; | |
import javax.xml.bind.annotation.XmlElement; | |
import javax.xml.bind.annotation.XmlRootElement; | |
@XmlRootElement(name="train") | |
class Train { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<catalog> | |
<book> | |
<author>Gambardella, Matthew</author> | |
<title>XML Developer's Guide</title> | |
<genre>Computer</genre> | |
<price>44.95</price> | |
<publish_date>2000-10-01</publish_date> | |
</book> | |
<book> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package SaveFieldsSerializableAnnotation; | |
import java.lang.reflect.Field; | |
import java.util.Map; | |
public class FindFieldAnnotation { | |
public static void FindAnnotation (TestContainer obj, Map<String, Object> fieldsList ){ | |
Class<?> cls = obj.getClass(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package SaveFieldsSerializableAnnotation; | |
import java.io.Serializable; | |
public class Container implements Serializable { | |
private int con; | |
public Container(int con1){ | |
con=con1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package TextConteiner; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
@SaveTo(nameFile = "d:\\1\\file.txt") | |
public class Container { | |
protected String myText; | |
public Container (String myText){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tester1; | |
/*Создать аннотацию Test, которая принимает параметры для процедуры тестирования и передает их в | |
метод, помеченный такой аннотацией.*/ | |
public class Main { | |
public static void main (String[] args){ | |
System.out.println (Tester.testSum(SomeClass.class)); | |
NewerOlder