i have read and noticed that all the SOAP requests are POST request by default.
Why is it POST by default? Is there any disadvantage of using GET in a SOAP request even when i am not sending any parameter to get a resource/response? I am not updating anything.
well thats correct.
The implementing class should "have" all the methods declared in an interface . its not written any where that it should 'implement' all the methods.
Comparator interface is an example of the same.
Thanks for the clarification
I have this code where ChildClass implements an interface Demo . the same method signature is used in SuperClass.
This code compiles fine.
Isn't it the breach in the contract of implementing an interface?
even though ChildClass 'has' doNothing() method but it doesn't implement it for the sake of Interface Contract.
what exactly is happening here.
this code compiles fine.but when i try to add string object to this list, compilation fails.
so my questions are
1. if this myList is a list that can refer to any ArrayList which extends Object class and according to my code i am assigning the arraylist of string to this reference.then why i can not store the value as string object to it?
2. if compiler doesn't allow to add string object to this list, why does it even allow to refer to the arrayList of string ? this is of no use if i can not add anything to it except null.
3. what is the scope of using this kind of collection objects?
any image can be read through FileInputSteram and the data can be stored in an array of byte.every image contains the header,other information and the image data of its specific type.suppose if we have read the header and after a specific offset in the byte stream ,the image data starts.that image data can be used in drawing images through JFrame.
There is a way to draw that image from that image data without those headers information.it can be done by taking the image data in some DataBufferInt and some of the methods i remember are getRaster().getDataBuffer().with the help of these the image can be generated in a JFrame.
so can you provide me the code to do this task.
@Randall Twede:i want the code to read the data of an image in byte form and then recreate that image with the help of that byte data excluding the header information.
byte rasterdata=new byte[br.available()]; //this is the array which has the byte of a bmp image.
ByteArrayInputStream bis= new ByteArrayInputStream(rasterdata);
Iterator<?> readers = ImageIO.getImageReadersByFormatName("bmp");
ImageReader reader = (ImageReader) readers.next();
Object source = bis;
ImageInputStream iis = ImageIO.createImageInputStream(source);
ImageReadParam param = reader.getDefaultReadParam();
Image image = reader.read(0,param); //and this the place where i am getting the following error
Exception in thread "main" java.lang.IllegalArgumentException: Invalid magic value for BMP file.
at com.sun.imageio.plugins.bmp.BMPImageReader.readHeader(Unknown Source)
at com.sun.imageio.plugins.bmp.BMPImageReader.read(Unknown Source)
i have an array of type byte.that array consist of the bytes read from an bmp image file.now how to recreate a bmp image file through that byte array.i have heared that it can be created by using bufferedimage and some other class.provide me the code of recreating the image through an array of byte using bufferedimage class.