/* package whatever; // don't place package name! */
import java.util.* ;
import java.lang.* ;
import java.io.* ;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone {
public static void main
( String argv
[ ] ) { byte [ ] bites = nux.getBytes ( ) ;
byte [ ] bites2 = nux2.getBytes ( ) ;
byte [ ] bites3 = nux3.getBytes ( ) ;
System .
out .
println ( AsciiToBinary
( "ª" ) ) ; System .
out .
println ( AsciiToBinary
( "Ø" ) ) ; System .
out .
println ( AsciiToBinary
( "(" ) ) ; System .
out .
println ( "La Cantidad de Bites que contiene es :" + bites.
length ) ; System .
out .
println ( "La Cantidad de Bites que contiene es :" + bites2.
length ) ; System .
out .
println ( "La Cantidad de Bites que contiene es :" + bites3.
length ) ;
}
byte [ ] bytes = asciiString.getBytes ( ) ;
StringBuilder binary = new StringBuilder( ) ;
for ( byte b : bytes)
{
int val = b;
for ( int i = 0 ; i < 8 ; i++ )
{
binary.append ( ( val & 128 ) == 0 ? 0 : 1 ) ;
val <<= 1 ;
}
}
return binary.toString ( ) ;
}
}
ICAgIC8qIHBhY2thZ2Ugd2hhdGV2ZXI7IC8vIGRvbid0IHBsYWNlIHBhY2thZ2UgbmFtZSEgKi8KICAgICAKICAgIGltcG9ydCBqYXZhLnV0aWwuKjsKICAgIGltcG9ydCBqYXZhLmxhbmcuKjsKICAgIGltcG9ydCBqYXZhLmlvLio7CiAgICAgCiAgICAvKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lIHsKICAgICAKICAgICAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmcgYXJndltdKXsKICAgICAgICAgICAgU3RyaW5nIG51eD0iwqoiOwogICAgICAgICAgICBTdHJpbmcgbnV4Mj0iw5giOwogICAgICAgICAgICBTdHJpbmcgbnV4Mz0iKCI7CiAgICAgICAgICAgIGJ5dGUgW11iaXRlcyA9IG51eC5nZXRCeXRlcygpOwogICAgICAgICAgICBieXRlIFtdYml0ZXMyID0gbnV4Mi5nZXRCeXRlcygpOwogICAgICAgICAgICBieXRlIFtdYml0ZXMzID0gbnV4My5nZXRCeXRlcygpOwogICAgICAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKEFzY2lpVG9CaW5hcnkoIsKqIikpOwogICAgICAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKEFzY2lpVG9CaW5hcnkoIsOYIikpOwogICAgICAgICAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbihBc2NpaVRvQmluYXJ5KCIoIikpOwogICAgICAgICAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiTGEgQ2FudGlkYWQgZGUgQml0ZXMgcXVlIGNvbnRpZW5lIGVzIDoiK2JpdGVzLmxlbmd0aCk7CiAgICAgICAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJMYSBDYW50aWRhZCBkZSBCaXRlcyBxdWUgY29udGllbmUgZXMgOiIrYml0ZXMyLmxlbmd0aCk7CiAgICAgICAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJMYSBDYW50aWRhZCBkZSBCaXRlcyBxdWUgY29udGllbmUgZXMgOiIrYml0ZXMzLmxlbmd0aCk7CiAgICAgCiAgICAgCiAgICAgICAgfQogICAgIAogICAgICAgIHB1YmxpYyBzdGF0aWMgU3RyaW5nIEFzY2lpVG9CaW5hcnkoU3RyaW5nIGFzY2lpU3RyaW5nKXsgIAogICAgIAogICAgICAgICAgICAgIGJ5dGVbXSBieXRlcyA9IGFzY2lpU3RyaW5nLmdldEJ5dGVzKCk7ICAKICAgICAgICAgICAgICBTdHJpbmdCdWlsZGVyIGJpbmFyeSA9IG5ldyBTdHJpbmdCdWlsZGVyKCk7ICAKICAgICAgICAgICAgICBmb3IgKGJ5dGUgYiA6IGJ5dGVzKSAgCiAgICAgICAgICAgICAgeyAgCiAgICAgICAgICAgICAgICAgaW50IHZhbCA9IGI7ICAKICAgICAgICAgICAgICAgICBmb3IgKGludCBpID0gMDsgaSA8IDg7IGkrKykgIAogICAgICAgICAgICAgICAgIHsgIAogICAgICAgICAgICAgICAgICAgIGJpbmFyeS5hcHBlbmQoKHZhbCAmIDEyOCkgPT0gMCA/IDAgOiAxKTsgIAogICAgICAgICAgICAgICAgICAgIHZhbCA8PD0gMTsgIAogICAgICAgICAgICAgICAgIH0gIAogICAgICAgICAgICAgIH0gIAogICAgICAgICAgICAgIHJldHVybiBiaW5hcnkudG9TdHJpbmcoKTsgIAogICAgICAgIH0gCiAgICAgCiAgICB9CiAgICAg