The "shape" is reminiscent of the "ular kepala dua" (colloquially, two-headed snakes) or Asian pipe snakes (Cylindrophiidae) wherein the tail and head are similarly shaped, i.e., blunt. (So it can't be the similar sunbeam snake, Xenopeltis unicolor: Xenopeltidae). There is only one Cylindrophiidae species in Java, Cylindrophis ruffus (red-tailed pipe snake), but I can't really match the exterior pattern of your specimen to even one in the one hundred images I've looked at! The most similar image I found is the older specimen depicted here http://bangkokherps.wordpress.com/2011/04/22/red-tailed-pipe-snake/
Comments (3)